On Fri, 24 Apr 2020 19:36:25 +0200 Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote: > Clarify these comments which are not very accurate (even wrong in the > read case). > > Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Reviewed-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> > --- > drivers/mtd/nand/raw/nand_base.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c > index db2745cf4f15..4d8a4a20df63 100644 > --- a/drivers/mtd/nand/raw/nand_base.c > +++ b/drivers/mtd/nand/raw/nand_base.c > @@ -3229,7 +3229,10 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from, > break; > } > > - /* Transfer not aligned data */ > + /* > + * Copy back the data in the initial buffer when reading > + * partial pages or when a bounce buffer is required. > + */ > if (use_bufpoi) { > if (!NAND_HAS_SUBPAGE_READ(chip) && !oob && > !(mtd->ecc_stats.failed - ecc_failures) && > @@ -4024,7 +4027,10 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to, > else > use_bufpoi = 0; > > - /* Partial page write?, or need to use bounce buffer */ > + /* > + * Copy the data from the initial buffer when doing partial page > + * writes or when a bounce buffer is required. > + */ > if (use_bufpoi) { > pr_debug("%s: using write bounce buffer for buf@%p\n", > __func__, buf); ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/