[PATCH] mtd: rawnand: cadence: fix address space mixup

Miquel Raynal miquel.raynal at bootlin.com
Thu Jan 9 11:21:10 PST 2020

Hi Arnd,

Arnd Bergmann <arnd at arndb.de> wrote on Tue, 10 Dec 2019 20:59:55 +0100:

> dma_addr_t and pointers can are not interchangeable, and can
> be different sizes:
> drivers/mtd/nand/raw/cadence-nand-controller.c: In function 'cadence_nand_cdma_transfer':
> drivers/mtd/nand/raw/cadence-nand-controller.c:1283:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>             (void *)dma_buf, (void *)dma_ctrl_dat,
>             ^
> drivers/mtd/nand/raw/cadence-nand-controller.c:1283:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>             (void *)dma_buf, (void *)dma_ctrl_dat,
>                              ^
> Use dma_addr_t consistently here, which cleans up a couple of casts
> as a side-effect.
> Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>

I just realized that I received three patches for the same issue in a
very tight timeframe about a month ago, yours was of course entirely
valid but I choose to apply the one from someone not contributing a lot
to encourage him, hope you don't mind :)


More information about the linux-mtd mailing list