netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isdn: add missing cast operator in drivers/isdn/sc/init.c
@ 2011-10-10 11:02 Il Han
  2011-10-10 18:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Il Han @ 2011-10-10 11:02 UTC (permalink / raw)
  To: Karsten Keil; +Cc: netdev, Il Han

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

Signed-off-by: Il Han <corone.il.han@gmail.com>
---
 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..79bde78 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((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;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] isdn: add missing cast operator in drivers/isdn/sc/init.c
  2011-10-10 11:02 [PATCH] isdn: add missing cast operator in drivers/isdn/sc/init.c Il Han
@ 2011-10-10 18:18 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-10-10 18:18 UTC (permalink / raw)
  To: corone.il.han; +Cc: isdn, netdev

From: Il Han <corone.il.han@gmail.com>
Date: Mon, 10 Oct 2011 20:02:40 +0900

> Add (void __iomem *) to convert the value to the proper type before passing it to readl().
> 
> Signed-off-by: Il Han <corone.il.han@gmail.com>

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-10 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10 11:02 [PATCH] isdn: add missing cast operator in drivers/isdn/sc/init.c Il Han
2011-10-10 18:18 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).