mtd: spear_smi: add missing __iomem annotation

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Aug 30 16:59:05 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e51fb2cb2b6e1ea2c99ad5dbd332f2524a21b68a
Commit:     e51fb2cb2b6e1ea2c99ad5dbd332f2524a21b68a
Parent:     2fffc7982c990f089a4ab9bed10d90d1d657b3fc
Author:     Jingoo Han <jg1.han at samsung.com>
AuthorDate: Wed Aug 7 16:16:36 2013 +0900
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:51:48 2013 +0100

    mtd: spear_smi: add missing __iomem annotation
    
    Added missing __iomem annotation in order to fix the following
    sparse warnings:
    
    drivers/mtd/devices/spear_smi.c:566:13: warning: incorrect type in assignment (different address spaces)
    drivers/mtd/devices/spear_smi.c:566:13:    expected void *src
    drivers/mtd/devices/spear_smi.c:566:13:    got void [noderef] <asn:2>*
    drivers/mtd/devices/spear_smi.c:586:9: warning: incorrect type in argument 2 (different address spaces)
    drivers/mtd/devices/spear_smi.c:586:9:    expected void const volatile [noderef] <asn:2>*<noident>
    drivers/mtd/devices/spear_smi.c:586:9:    got unsigned char [usertype] *<noident>
    drivers/mtd/devices/spear_smi.c:659:14: warning: incorrect type in assignment (different address spaces)
    drivers/mtd/devices/spear_smi.c:659:14:    expected void *dest
    drivers/mtd/devices/spear_smi.c:659:14:    got void [noderef] <asn:2>*
    drivers/mtd/devices/spear_smi.c:620:9: warning: incorrect type in argument 1 (different address spaces)
    drivers/mtd/devices/spear_smi.c:620:9:    expected void volatile [noderef] <asn:2>*<noident>
    drivers/mtd/devices/spear_smi.c:620:9:    got void *dest
    drivers/mtd/devices/spear_smi.c:620:9: warning: incorrect type in argument 1 (different address spaces)
    drivers/mtd/devices/spear_smi.c:620:9:    expected void volatile [noderef] <asn:2>*<noident>
    drivers/mtd/devices/spear_smi.c:620:9:    got void *dest
    drivers/mtd/devices/spear_smi.c:620:9: warning: incorrect type in argument 1 (different address spaces)
    drivers/mtd/devices/spear_smi.c:620:9:    expected void volatile [noderef] <asn:2>*<noident>
    drivers/mtd/devices/spear_smi.c:620:9:    got void *dest
    
    Signed-off-by: Jingoo Han <jg1.han at samsung.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/devices/spear_smi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 092bb68..4238214 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -550,7 +550,7 @@ static int spear_mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
 {
 	struct spear_snor_flash *flash = get_flash_data(mtd);
 	struct spear_smi *dev = mtd->priv;
-	void *src;
+	void __iomem *src;
 	u32 ctrlreg1, val;
 	int ret;
 
@@ -583,7 +583,7 @@ static int spear_mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
 
 	writel(val, dev->io_base + SMI_CR1);
 
-	memcpy_fromio(buf, (u8 *)src, len);
+	memcpy_fromio(buf, src, len);
 
 	/* restore ctrl reg1 */
 	writel(ctrlreg1, dev->io_base + SMI_CR1);
@@ -596,7 +596,7 @@ static int spear_mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
 }
 
 static inline int spear_smi_cpy_toio(struct spear_smi *dev, u32 bank,
-		void *dest, const void *src, size_t len)
+		void __iomem *dest, const void *src, size_t len)
 {
 	int ret;
 	u32 ctrlreg1;
@@ -643,7 +643,7 @@ static int spear_mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
 {
 	struct spear_snor_flash *flash = get_flash_data(mtd);
 	struct spear_smi *dev = mtd->priv;
-	void *dest;
+	void __iomem *dest;
 	u32 page_offset, page_size;
 	int ret;
 



More information about the linux-mtd-cvs mailing list