[PATCH v3] OMAP2/3: NAND: Convert write/read functions to raw read/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following sparse warnings exists due to use of writel/w and readl/w functions.

This patch fixes the sparse warnings by converting readl/w functions usage into
__raw_readl/__raw_readw functions.

drivers/mtd/nand/omap2.c:484:15: warning: symbol '__v' shadows an earlier one
drivers/mtd/nand/omap2.c:484:15: originally declared here

drivers/mtd/onenand/omap2.c:86:9: warning: symbol '__v' shadows an earlier one
drivers/mtd/onenand/omap2.c:86:9: originally declared here

Signed-off-by: G, Manjunath Kondaiah <manjugk@xxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-mtd@xxxxxxxxxxxxxxxxxxx
---
Changes since v1 and v2:
 - no logical changes, patch seperated from series based on Tony's suggestion.

 drivers/mtd/nand/omap2.c    |    2 +-
 drivers/mtd/onenand/omap2.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 439e80d..23d2810 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -481,7 +481,7 @@ static int omap_verify_buf(struct mtd_info *mtd, const u_char * buf, int len)
 
 	len >>= 1;
 	while (len--) {
-		if (*p++ != cpu_to_le16(readw(info->nand.IO_ADDR_R)))
+		if (*p++ != cpu_to_le16(__raw_readw(info->nand.IO_ADDR_R)))
 			return -EFAULT;
 	}
 
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 608cc8d..b6a2b9f 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -83,7 +83,7 @@ static irqreturn_t omap2_onenand_interrupt(int irq, void *dev_id)
 
 static inline unsigned short read_reg(struct omap2_onenand *c, int reg)
 {
-	return readw(c->onenand.base + reg);
+	return __raw_readw(c->onenand.base + reg);
 }
 
 static inline void write_reg(struct omap2_onenand *c, unsigned short value,
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux