[PATCH] drivers/isdn/sc/init.c: Fix warning:passing argument 1 of âreadlâ makes pointer from integer without a cast

From: Harvey Yang
Date: Fri Sep 02 2011 - 22:06:44 EST


drivers/isdn/sc/init.c:487: warning: passing argument 1 of âreadlâ makes pointer from integer without a cast
/home/harvey/Projects/linux-kernel/linux-2.6/arch/x86/include/asm/io.h:55: note: expected âconst volatile void *â but argument is of type âlong unsigned intâ
drivers/isdn/sc/init.c:497: warning: passing argument 1 of âreadlâ makes pointer from integer without a cast
/home/harvey/Projects/linux-kernel/linux-2.6/arch/x86/include/asm/io.h:55: note: expected âconst volatile void *â but argument is of type âlong unsigned intâ
drivers/isdn/sc/init.c:507: warning: passing argument 1 of âreadlâ makes pointer from integer without a cast
/home/harvey/Projects/linux-kernel/linux-2.6/arch/x86/include/asm/io.h:55: note: expected âconst volatile void *â but argument is of type âlong unsigned intâ

Signed-off-by: Harvey Yang <harvey.huawei.yang@xxxxxxxxx>
---
drivers/isdn/sc/init.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index ca710ab..d3db30d 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -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((const volatile void *)(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((const volatile void *)(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((const volatile void *)(rambase + SIG_OFFSET));
pr_debug("Looking for a signature, got 0x%lx\n", sig);
if(sig != SIGNATURE)
return -1;
--
1.7.2.5

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