Skip to content

Commit 83bbfe5

Browse files
Boris Brezillonambarus
authored andcommitted
mtd: nand: atmel: Add an __iomem cast on gen_pool_dma_alloc() call
gen_pool_dma_alloc() return type is void *, while internally, the memory region exposed by the sram driver has been mapped with ioremap(). Add a void * to void __iomem * cast to make sparse happy. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [tudor.ambarus@microchip.com: backport the patch] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 8ab2847 commit 83bbfe5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/mtd/nand/atmel/nand-controller.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,9 +2211,9 @@ atmel_hsmc_nand_controller_init(struct atmel_hsmc_nand_controller *nc)
22112211
return -ENOMEM;
22122212
}
22132213

2214-
nc->sram.virt = gen_pool_dma_alloc(nc->sram.pool,
2215-
ATMEL_NFC_SRAM_SIZE,
2216-
&nc->sram.dma);
2214+
nc->sram.virt = (void __iomem *)gen_pool_dma_alloc(nc->sram.pool,
2215+
ATMEL_NFC_SRAM_SIZE,
2216+
&nc->sram.dma);
22172217
if (!nc->sram.virt) {
22182218
dev_err(nc->base.dev,
22192219
"Could not allocate memory from the NFC SRAM pool\n");

0 commit comments

Comments
 (0)