LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH 3/4] Char: ip2, fix sparse warnings
Date: Sat, 5 Jul 2008 15:28:25 +0200 [thread overview]
Message-ID: <1215264506-32455-3-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <1215264506-32455-2-git-send-email-jirislaby@gmail.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/char/ip2/ip2main.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 4174c65..d9b30ab 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -375,9 +375,7 @@ have_requested_irq( char irq )
/* handle subsequent installations of the driver. All memory allocated by the */
/* driver should be returned since it may be unloaded from memory. */
/******************************************************************************/
-#ifdef MODULE
-void __exit
-ip2_cleanup_module(void)
+static void __exit ip2_cleanup_module(void)
{
int err;
int i;
@@ -431,7 +429,8 @@ ip2_cleanup_module(void)
ip2config.pci_dev[i] = NULL;
}
#endif
- if ((pB = i2BoardPtrTable[i]) != 0 ) {
+ pB = i2BoardPtrTable[i];
+ if (pB != NULL) {
kfree ( pB );
i2BoardPtrTable[i] = NULL;
}
@@ -448,7 +447,6 @@ ip2_cleanup_module(void)
#endif
}
module_exit(ip2_cleanup_module);
-#endif /* MODULE */
static const struct tty_operations ip2_ops = {
.open = ip2_open,
@@ -1253,9 +1251,8 @@ ip2_polled_interrupt(void)
{
int i;
i2eBordStrPtr pB;
- const int irq = 0;
- ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );
+ ip2trace(ITRC_NO_PORT, ITRC_INTR, 99, 1, 0);
/* Service just the boards on the list using this irq */
for( i = 0; i < i2nBoards; ++i ) {
@@ -1264,9 +1261,8 @@ ip2_polled_interrupt(void)
// Only process those boards which match our IRQ.
// IRQ = 0 for polled boards, we won't poll "IRQ" boards
- if ( pB && (pB->i2eUsingIrq == irq) ) {
+ if (pB && pB->i2eUsingIrq == 0)
ip2_irq_work(pB);
- }
}
++irq_counter;
--
1.5.5.1
next prev parent reply other threads:[~2008-07-05 13:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 13:28 [PATCH 1/4] Char: merge ip2main and ip2base Jiri Slaby
2008-07-05 13:28 ` [PATCH 2/4] Char: ip2, cleanup globals Jiri Slaby
2008-07-05 13:28 ` Jiri Slaby [this message]
2008-07-05 13:28 ` [PATCH 4/4] Char: ip2, init/deinit cleanup Jiri Slaby
2008-07-22 9:44 ` [PATCH 1/4] Char: merge ip2main and ip2base Andrew Morton
2008-07-22 9:44 ` Alan Cox
2008-07-22 10:06 ` Andrew Morton
2008-07-22 10:25 ` Alan Cox
[not found] <20080328032449.cbc09f3b.akpm@linux-foundation.org>
2008-03-28 21:18 ` [PATCH 3/4] Char: ip2, fix sparse warnings Jiri Slaby
2008-03-31 23:57 ` Andrew Morton
2008-04-01 9:53 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1215264506-32455-3-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 3/4] Char: ip2, fix sparse warnings' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).