[PATCH 2/8] base:driver: Fix sparse warning.

Marek Belisko marek.belisko at open-nandra.com
Thu Oct 13 16:23:08 EDT 2011


warnings:
drivers/base/driver.c:247:7: warning: incorrect type in assignment (different address spaces)
drivers/base/driver.c:247:7:    expected void *<noident>
drivers/base/driver.c:247:7:    got void [noderef] <asn:2>*
drivers/base/driver.c:256:7: warning: incorrect type in assignment (different address spaces)
drivers/base/driver.c:256:7:    expected void *<noident>
drivers/base/driver.c:256:7:    got void [noderef] <asn:2>*

Signed-off-by: Marek Belisko <marek.belisko at open-nandra.com>
---
 drivers/base/driver.c |    4 ++--
 include/driver.h      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 0b80103..ddbba6b 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -237,7 +237,7 @@ int dev_protect(struct device_d *dev, size_t count, unsigned long offset, int pr
 	return -EINVAL;
 }
 
-int generic_memmap_ro(struct cdev *cdev, void **map, int flags)
+int generic_memmap_ro(struct cdev *cdev, void __iomem **map, int flags)
 {
 	if (!cdev->dev)
 		return -EINVAL;
@@ -248,7 +248,7 @@ int generic_memmap_ro(struct cdev *cdev, void **map, int flags)
 	return 0;
 }
 
-int generic_memmap_rw(struct cdev *cdev, void **map, int flags)
+int generic_memmap_rw(struct cdev *cdev, void __iomem **map, int flags)
 {
 	if (!cdev->dev)
 		return -EINVAL;
diff --git a/include/driver.h b/include/driver.h
index 80de0c8..39ced2c 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -303,8 +303,8 @@ int dummy_probe(struct device_d *);
  */
 void devices_shutdown(void);
 
-int generic_memmap_ro(struct cdev *dev, void **map, int flags);
-int generic_memmap_rw(struct cdev *dev, void **map, int flags);
+int generic_memmap_ro(struct cdev *dev, void __iomem **map, int flags);
+int generic_memmap_rw(struct cdev *dev, void __iomem **map, int flags);
 
 static inline off_t dev_lseek_default(struct cdev *cdev, off_t ofs)
 {
-- 
1.7.4.1




More information about the barebox mailing list