Skip to contentSkip to conversation

isdn: add missing cast operator in drivers/isdn/sc/init.c

PATCH In review Il Han 2 participants 2 messages Oct 10, 2011

Subsystems (2)
lore
Share & tools
lore

Il Han

author
#0 lore raw

PATCH 1/1 isdn: add missing cast operator in drivers/isdn/sc/init.c

Add (void __iomem *) to convert the value to the proper type before passing it to readl().

---
 drivers/isdn/sc/init.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/isdn/sc/init.c +3 -3
index ca710ab..79bde78 100644
@@ -484,7 +484,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
 	 */
 	outb(PRI_BASEPG_VAL, pgport);
 	msleep_interruptible(1000);
-	sig = readl(rambase + SIG_OFFSET);
+	sig = readl((void __iomem *)rambase + SIG_OFFSET);
 	pr_debug("Looking for a signature, got 0x%lx\n", sig);
 	if(sig == SIGNATURE)
 		return PRI_BOARD;
@@ -494,7 +494,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
 	 */
 	outb(BRI_BASEPG_VAL, pgport);
 	msleep_interruptible(1000);
-	sig = readl(rambase + SIG_OFFSET);
+	sig = readl((void __iomem *)rambase + SIG_OFFSET);
 	pr_debug("Looking for a signature, got 0x%lx\n", sig);
 	if(sig == SIGNATURE)
 		return BRI_BOARD;
@@ -504,7 +504,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
 	/*
 	 * Try to spot a card
 	 */
-	sig = readl(rambase + SIG_OFFSET);
+	sig = readl((void __iomem *)rambase + SIG_OFFSET);
 	pr_debug("Looking for a signature, got 0x%lx\n", sig);
 	if(sig != SIGNATURE)
 		return -1;
Signature · 1 line
1.7.4.1
maintainer
#1 lore raw

From: Il Han <[email protected]>
Date: Mon, 10 Oct 2011 20:02:40 +0900

Quoted 3 lines

Add (void __iomem *) to convert the value to the proper type before passing it to readl().

I've rejected this patch already in the past, and this is because the correct fix is to change the type of rambase and the variables and datastructures it is initialized from.