Patchwork mtd: fsl_ifc_nand: fix cast removes address space of expression warnings

login
register
mail settings
Submitter Kim Phillips
Date Sept. 13, 2012, 11:56 p.m.
Message ID <20120913185607.af76965cb973dfb1059c842f@freescale.com>
Download mbox | patch
Permalink /patch/183769/
State New
Headers show

Comments

Kim Phillips - Sept. 13, 2012, 11:56 p.m.
found by sparse.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/mtd/nand/fsl_ifc_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Artem Bityutskiy - Sept. 26, 2012, 8:08 a.m.
On Thu, 2012-09-13 at 18:56 -0500, Kim Phillips wrote:
> found by sparse.
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>

Pushed to l2-mtd.git, thanks!

Patch

diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index e92d223..1be83dc 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -193,7 +193,7 @@  static int is_blank(struct mtd_info *mtd, unsigned int bufnum)
 	struct nand_chip *chip = mtd->priv;
 	struct fsl_ifc_mtd *priv = chip->priv;
 	u8 __iomem *addr = priv->vbase + bufnum * (mtd->writesize * 2);
-	u32 __iomem *mainarea = (u32 *)addr;
+	u32 __iomem *mainarea = (u32 __iomem *)addr;
 	u8 __iomem *oob = addr + mtd->writesize;
 	int i;
 
@@ -591,8 +591,8 @@  static uint8_t fsl_ifc_read_byte16(struct mtd_info *mtd)
 	 * next byte.
 	 */
 	if (ifc_nand_ctrl->index < ifc_nand_ctrl->read_bytes) {
-		data = in_be16((uint16_t *)&ifc_nand_ctrl->
-					addr[ifc_nand_ctrl->index]);
+		data = in_be16((uint16_t __iomem *)&ifc_nand_ctrl->
+			       addr[ifc_nand_ctrl->index]);
 		ifc_nand_ctrl->index += 2;
 		return (uint8_t) data;
 	}