diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-07 13:52:34 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-11 10:51:42 +0300 |
commit | 21b5cf3f6467cf608756151066941792f340c986 (patch) | |
tree | bf907a5b116428540a027b21a1ca0f6ab9a54ca2 /drivers | |
parent | 6446907307da6e3e490b1d9169d6ebab6622dee0 (diff) | |
download | linux-21b5cf3f6467cf608756151066941792f340c986.tar.xz |
mtd: rawnand: Avoid indirect access to ->data_buf()
The logic in nand_do_read_ops() is to use a bufpoi variable, either
set to the original buffer, or set to a bounce buffer which in the end
happens to be chip->data_buf depending on the value of the
use_bounce_buf boolean. This is not a reason to call chip->data_buf
directly when we know that we are using the bounce buffer. Let's use
bufpoi instead to be consistent.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200507105241.14299-7-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/raw/nand_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index e2d96653fc3f..c440f11a34e9 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -3293,7 +3293,7 @@ read_retry: /* Invalidate page cache */ chip->pagecache.page = -1; } - memcpy(buf, chip->data_buf + col, bytes); + memcpy(buf, bufpoi + col, bytes); } if (unlikely(oob)) { |