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

Arnd Bergmann arnd at arndb.de
Thu Jan 9 14:19:40 PST 2020


On Thu, Jan 9, 2020 at 8:21 PM Miquel Raynal <miquel.raynal at bootlin.com> wrote:
>
> 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 :)

Sounds good to me, thanks for getting it fixed

      Arnd



More information about the linux-mtd mailing list