Loading drivers/mtd/devices/msm_qpic_nand.c +21 −8 Original line number Diff line number Diff line Loading @@ -1767,9 +1767,10 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, loff_t aligned_from; loff_t offset; size_t len; size_t actual_len; size_t actual_len, ret_len; actual_len = ops->len; ret_len = 0; actual_buf = ops->datbuf; bounce_buf = kmalloc(mtd->writesize, GFP_KERNEL); Loading @@ -1796,14 +1797,17 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, ops->datbuf = no_copy ? actual_buf : bounce_buf; err = msm_nand_read_oob(mtd, aligned_from, ops); if (err < 0) if (err < 0) { ret_len = ops->retlen; break; } if (!no_copy) memcpy(actual_buf, bounce_buf + offset, len); actual_len -= len; ops->retlen += len; ret_len += len; if (actual_len == 0) break; Loading @@ -1812,6 +1816,7 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, aligned_from += mtd->writesize; } ops->retlen = ret_len; kfree(bounce_buf); out: return err; Loading Loading @@ -1847,13 +1852,21 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, if (ret < 0) break; len -= mtd->writesize; *retlen += mtd->writesize; len -= ops.retlen; *retlen += ops.retlen; if (len == 0) break; buf += ops.retlen; from += ops.retlen; buf += mtd->writesize; from += mtd->writesize; if (len < mtd->writesize) { ops.len = len; ops.datbuf = buf; ret = msm_nand_read_partial_page( mtd, from, &ops); *retlen += ops.retlen; break; } } } else { ops.len = len; Loading Loading
drivers/mtd/devices/msm_qpic_nand.c +21 −8 Original line number Diff line number Diff line Loading @@ -1767,9 +1767,10 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, loff_t aligned_from; loff_t offset; size_t len; size_t actual_len; size_t actual_len, ret_len; actual_len = ops->len; ret_len = 0; actual_buf = ops->datbuf; bounce_buf = kmalloc(mtd->writesize, GFP_KERNEL); Loading @@ -1796,14 +1797,17 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, ops->datbuf = no_copy ? actual_buf : bounce_buf; err = msm_nand_read_oob(mtd, aligned_from, ops); if (err < 0) if (err < 0) { ret_len = ops->retlen; break; } if (!no_copy) memcpy(actual_buf, bounce_buf + offset, len); actual_len -= len; ops->retlen += len; ret_len += len; if (actual_len == 0) break; Loading @@ -1812,6 +1816,7 @@ static int msm_nand_read_partial_page(struct mtd_info *mtd, aligned_from += mtd->writesize; } ops->retlen = ret_len; kfree(bounce_buf); out: return err; Loading Loading @@ -1847,13 +1852,21 @@ static int msm_nand_read(struct mtd_info *mtd, loff_t from, size_t len, if (ret < 0) break; len -= mtd->writesize; *retlen += mtd->writesize; len -= ops.retlen; *retlen += ops.retlen; if (len == 0) break; buf += ops.retlen; from += ops.retlen; buf += mtd->writesize; from += mtd->writesize; if (len < mtd->writesize) { ops.len = len; ops.datbuf = buf; ret = msm_nand_read_partial_page( mtd, from, &ops); *retlen += ops.retlen; break; } } } else { ops.len = len; Loading