* [PATCH] Drivers: isdn: Fixed warnings and odd code.
@ 2010-07-10 21:27 Zachary Richey
2010-07-10 21:33 ` David Miller
2010-07-10 21:41 ` Sam Ravnborg
0 siblings, 2 replies; 3+ messages in thread
From: Zachary Richey @ 2010-07-10 21:27 UTC (permalink / raw)
To: isdn, tj; +Cc: linux-kernel, Zachary Richey
This patch fixes compile time warnings in drivers/isdn/sc/init.c, and
also cleans up what looked like redundant code in this file.
Signed-off-by: Zachary Richey <zr.public@gmail.com>
---
drivers/isdn/sc/init.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index ca710ab..1255995 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -484,27 +484,18 @@ 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(&rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%lx\n", sig);
- if(sig == SIGNATURE)
+ if (sig == SIGNATURE)
return PRI_BOARD;
-
- /*
- * Try to identify a PRI card
- */
- outb(BRI_BASEPG_VAL, pgport);
- msleep_interruptible(1000);
- sig = readl(rambase + SIG_OFFSET);
- pr_debug("Looking for a signature, got 0x%lx\n", sig);
- if(sig == SIGNATURE)
+ if (sig == SIGNATURE)
return BRI_BOARD;
-
return -1;
/*
* Try to spot a card
*/
- sig = readl(rambase + SIG_OFFSET);
+ sig = readl(&rambase + SIG_OFFSET);
pr_debug("Looking for a signature, got 0x%lx\n", sig);
if(sig != SIGNATURE)
return -1;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Drivers: isdn: Fixed warnings and odd code.
2010-07-10 21:27 [PATCH] Drivers: isdn: Fixed warnings and odd code Zachary Richey
@ 2010-07-10 21:33 ` David Miller
2010-07-10 21:41 ` Sam Ravnborg
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-07-10 21:33 UTC (permalink / raw)
To: zr.public; +Cc: isdn, tj, linux-kernel
From: Zachary Richey <zr.public@gmail.com>
Date: Sat, 10 Jul 2010 17:27:29 -0400
> @@ -484,27 +484,18 @@ 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(&rambase + SIG_OFFSET);
There is no way this is correct.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Drivers: isdn: Fixed warnings and odd code.
2010-07-10 21:27 [PATCH] Drivers: isdn: Fixed warnings and odd code Zachary Richey
2010-07-10 21:33 ` David Miller
@ 2010-07-10 21:41 ` Sam Ravnborg
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2010-07-10 21:41 UTC (permalink / raw)
To: Zachary Richey; +Cc: isdn, tj, linux-kernel
On Sat, Jul 10, 2010 at 05:27:29PM -0400, Zachary Richey wrote:
> This patch fixes compile time warnings in drivers/isdn/sc/init.c, and
> also cleans up what looked like redundant code in this file.
> outb(PRI_BASEPG_VAL, pgport);
Here we request Primary rate interface - see "PRI"
> msleep_interruptible(1000);
> - sig = readl(rambase + SIG_OFFSET);
> + sig = readl(&rambase + SIG_OFFSET);
> pr_debug("Looking for a signature, got 0x%lx\n", sig);
> - if(sig == SIGNATURE)
> + if (sig == SIGNATURE)
> return PRI_BOARD;
> -
> - /*
> - * Try to identify a PRI card
> - */
> - outb(BRI_BASEPG_VAL, pgport);
Here we request Basic rate interface - see "BRI".
So this is not redundant code and you cannot delete it.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-10 21:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 21:27 [PATCH] Drivers: isdn: Fixed warnings and odd code Zachary Richey
2010-07-10 21:33 ` David Miller
2010-07-10 21:41 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox