mtd: onenand: fix build warning for dma type
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jun 10 23:59:07 PDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=81d46c59550997ae17e441c0327ee92f7ba7dc6f
Commit: 81d46c59550997ae17e441c0327ee92f7ba7dc6f
Parent: cb3346ac244652f6b70ab7312ec9ecde6ec4dbc6
Author: Arnd Bergmann <arnd at arndb.de>
AuthorDate: Thu May 8 16:56:14 2014 +0200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue May 20 16:35:31 2014 -0700
mtd: onenand: fix build warning for dma type
The samsung onenand driver passes around a dma address token
through a void pointer, which is incorrect and leads to
warnings like this one:
onenand/samsung.c:548:2: warning: passing argument 1 of '__fswab32' makes integer from pointer without a cast [enabled by default]
writel(src, base + S5PC110_DMA_SRC_ADDR);
^
This patch makes it use dma_addr_t here, which is more appropriate.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Cc: Kyungmin Park <kyungmin.park at samsung.com>
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: linux-mtd at lists.infradead.org
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/onenand/samsung.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index b1a792f..efb819c 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -537,9 +537,9 @@ static int onenand_write_bufferram(struct mtd_info *mtd, int area,
return 0;
}
-static int (*s5pc110_dma_ops)(void *dst, void *src, size_t count, int direction);
+static int (*s5pc110_dma_ops)(dma_addr_t dst, dma_addr_t src, size_t count, int direction);
-static int s5pc110_dma_poll(void *dst, void *src, size_t count, int direction)
+static int s5pc110_dma_poll(dma_addr_t dst, dma_addr_t src, size_t count, int direction)
{
void __iomem *base = onenand->dma_addr;
int status;
@@ -605,7 +605,7 @@ static irqreturn_t s5pc110_onenand_irq(int irq, void *data)
return IRQ_HANDLED;
}
-static int s5pc110_dma_irq(void *dst, void *src, size_t count, int direction)
+static int s5pc110_dma_irq(dma_addr_t dst, dma_addr_t src, size_t count, int direction)
{
void __iomem *base = onenand->dma_addr;
int status;
@@ -686,7 +686,7 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
dev_err(dev, "Couldn't map a %d byte buffer for DMA\n", count);
goto normal;
}
- err = s5pc110_dma_ops((void *) dma_dst, (void *) dma_src,
+ err = s5pc110_dma_ops(dma_dst, dma_src,
count, S5PC110_DMA_DIR_READ);
if (page_dma)
More information about the linux-mtd-cvs
mailing list