diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-13 16:45:42 +0300 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-06-20 10:14:39 +0300 |
commit | 2291cb89680637f8f965371973273be312f2cede (patch) | |
tree | a3d4e1521bcfe4ef208dbaee1576982f121bb2e7 /drivers/mtd/nand/denali.h | |
parent | d49f5790278d18fd6b8e474397d9abfdf29a48f2 (diff) | |
download | linux-2291cb89680637f8f965371973273be312f2cede.tar.xz |
mtd: nand: denali: propagate page to helpers via function argument
This driver stores the currently addressed page into denali->page,
which is later read out by helper functions. While I am tackling on
this driver, I often missed to insert "denali->page = page;" where
needed. This makes page_read/write callbacks to get access to a
wrong page, which is a bug hard to figure out.
Instead, I'd rather pass the page via function argument because the
compiler's prototype checks will help to detect bugs.
For the same reason, propagate dma_addr to the DMA helpers instead
of denali->buf.dma_buf .
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/denali.h')
-rw-r--r-- | drivers/mtd/nand/denali.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h index a84d8784ee98..ad2223d179d0 100644 --- a/drivers/mtd/nand/denali.h +++ b/drivers/mtd/nand/denali.h @@ -316,7 +316,6 @@ struct denali_nand_info { int flash_bank; /* currently selected chip */ struct nand_buf buf; struct device *dev; - int page; void __iomem *flash_reg; /* Register Interface */ void __iomem *flash_mem; /* Host Data/Command Interface */ |