[PATCH 4.4 151/193] isdn: sc: work around type mismatch warning

From: Greg Kroah-Hartman
Date: Fri Feb 23 2018 - 15:18:41 EST


4.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Arnd Bergmann <arnd@xxxxxxxx>

This driver shows warnings on many architectures:

drivers/isdn/sc/init.c: In function 'identify_board':
drivers/isdn/sc/init.c:484:2: error: passing argument 1 of 'readl' makes pointer from integer without a cast [-Werror]

In newer kernels, it was completely removed, but for the 4.4-stable
series, let's just shut up that warning by adding an extra variable
to do the necessary type cast.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/isdn/sc/init.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -441,6 +441,7 @@ static int identify_board(unsigned long
RspMessage rcvmsg;
ReqMessage sndmsg;
HWConfig_pl hwci;
+ void __iomem *rambase_sig = (void __iomem *)rambase + SIG_OFFSET;
int x;

pr_debug("Attempting to identify adapter @ 0x%lx io 0x%x\n",
@@ -481,7 +482,7 @@ static int identify_board(unsigned long
*/
outb(PRI_BASEPG_VAL, pgport);
msleep_interruptible(1000);
- sig = readl(rambase + SIG_OFFSET);
+ sig = readl(rambase_sig);
pr_debug("Looking for a signature, got 0x%lx\n", sig);
if (sig == SIGNATURE)
return PRI_BOARD;
@@ -491,7 +492,7 @@ static int identify_board(unsigned long
*/
outb(BRI_BASEPG_VAL, pgport);
msleep_interruptible(1000);
- sig = readl(rambase + SIG_OFFSET);
+ sig = readl(rambase_sig);
pr_debug("Looking for a signature, got 0x%lx\n", sig);
if (sig == SIGNATURE)
return BRI_BOARD;
@@ -501,7 +502,7 @@ static int identify_board(unsigned long
/*
* Try to spot a card
*/
- sig = readl(rambase + SIG_OFFSET);
+ sig = readl(rambase_sig);
pr_debug("Looking for a signature, got 0x%lx\n", sig);
if (sig != SIGNATURE)
return -1;