All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/isdn/sc/init.c: Fix warning:passing argument 1 of ‘readl’ makes pointer from integer without a cast
@ 2011-09-03  2:02 Harvey Yang
  2011-09-03  2:28   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Harvey Yang @ 2011-09-03  2:02 UTC (permalink / raw)
  To: Karsten Keil; +Cc: linux-kernel, netdev, Harvey Yang

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@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..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


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

* Re: [PATCH] drivers/isdn/sc/init.c: Fix warning:passing argument 1 of ‘readl’ makes pointer from integer without a cast
  2011-09-03  2:02 [PATCH] drivers/isdn/sc/init.c: Fix warning:passing argument 1 of ‘readl’ makes pointer from integer without a cast Harvey Yang
@ 2011-09-03  2:28   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-09-03  2:28 UTC (permalink / raw)
  To: harvey.huawei.yang; +Cc: isdn, linux-kernel, netdev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=iso-8859-7, Size: 491 bytes --]

From: Harvey Yang <harvey.huawei.yang@gmail.com>
Date: Sat,  3 Sep 2011 10:02:19 +0800

> drivers/isdn/sc/init.c:487: warning: passing argument 1 of ¡readl¢ makes pointer from integer without a cast

We should fix this by adding random casts to every readl() call,
instead we should fix the fundamental data types being passed
in.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH] drivers/isdn/sc/init.c: Fix warning:passing argument 1 of ‘readl’ makes pointer from integer without a cast
@ 2011-09-03  2:28   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-09-03  2:28 UTC (permalink / raw)
  To: harvey.huawei.yang; +Cc: isdn, linux-kernel, netdev

From: Harvey Yang <harvey.huawei.yang@gmail.com>
Date: Sat,  3 Sep 2011 10:02:19 +0800

> drivers/isdn/sc/init.c:487: warning: passing argument 1 of ‘readl’ makes pointer from integer without a cast

We should fix this by adding random casts to every readl() call,
instead we should fix the fundamental data types being passed
in.

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

end of thread, other threads:[~2011-09-03  2:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-03  2:02 [PATCH] drivers/isdn/sc/init.c: Fix warning:passing argument 1 of ‘readl’ makes pointer from integer without a cast Harvey Yang
2011-09-03  2:28 ` David Miller
2011-09-03  2:28   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.