From: Jeff Garzik <jeff@garzik.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: paulkf@microgate.com
Subject: [PATCH 9/17] drivers/char/{synclink,tpm}: irq handler cleanups
Date: Sun, 21 Oct 2007 03:52:35 -0400 (EDT) [thread overview]
Message-ID: <20071021075235.25BC519041C@havoc.gtf.org> (raw)
In-Reply-To: <lkjvxcz09835mnsdfv0983q4m1234m@havoc.gtf.org>
commit 81ccec23142e4fe42b3f72faecccb7b64f84007e
Author: Jeff Garzik <jeff@garzik.org>
Date: Fri Oct 19 19:27:19 2007 -0400
drivers/char/{synclink,tpm}: irq handler cleanups
* no need to use 'irq' function arg
* delete pointless test, pointless casts
* add KERN_xxx prefixes where appropriate
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/char/synclink.c | 21 +++++++++------------
drivers/char/synclink_gt.c | 13 ++++---------
drivers/char/synclinkmp.c | 22 +++++++++-------------
drivers/char/tpm/tpm_tis.c | 2 +-
4 files changed, 23 insertions(+), 35 deletions(-)
81ccec23142e4fe42b3f72faecccb7b64f84007e
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 905d1f5..aa09909 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -1696,20 +1696,16 @@ static void mgsl_isr_transmit_dma( struct mgsl_struct *info )
*
* Return Value: None
*/
-static irqreturn_t mgsl_interrupt(int irq, void *dev_id)
+static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
{
- struct mgsl_struct * info;
+ struct mgsl_struct *info = dev_id;
u16 UscVector;
u16 DmaVector;
if ( debug_level >= DEBUG_LEVEL_ISR )
- printk("%s(%d):mgsl_interrupt(%d)entry.\n",
- __FILE__,__LINE__,irq);
+ printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)entry.\n",
+ __FILE__, __LINE__, info->irq_level);
- info = (struct mgsl_struct *)dev_id;
- if (!info)
- return IRQ_NONE;
-
spin_lock(&info->irq_spinlock);
for(;;) {
@@ -1733,8 +1729,8 @@ static irqreturn_t mgsl_interrupt(int irq, void *dev_id)
mgsl_isr_receive_dma(info);
if ( info->isr_overflow ) {
- printk(KERN_ERR"%s(%d):%s isr overflow irq=%d\n",
- __FILE__,__LINE__,info->device_name, irq);
+ printk(KERN_ERR "%s(%d):%s isr overflow irq=%d\n",
+ __FILE__, __LINE__, info->device_name, info->irq_level);
usc_DisableMasterIrqBit(info);
usc_DisableDmaInterrupts(info,DICR_MASTER);
break;
@@ -1756,8 +1752,9 @@ static irqreturn_t mgsl_interrupt(int irq, void *dev_id)
spin_unlock(&info->irq_spinlock);
if ( debug_level >= DEBUG_LEVEL_ISR )
- printk("%s(%d):mgsl_interrupt(%d)exit.\n",
- __FILE__,__LINE__,irq);
+ printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)exit.\n",
+ __FILE__, __LINE__, info->irq_level);
+
return IRQ_HANDLED;
} /* end of mgsl_interrupt() */
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index 64e835f..468dae1 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -492,7 +492,6 @@ static void isr_serial(struct slgt_info *info);
static void isr_rdma(struct slgt_info *info);
static void isr_txeom(struct slgt_info *info, unsigned short status);
static void isr_tdma(struct slgt_info *info);
-static irqreturn_t slgt_interrupt(int irq, void *dev_id);
static int alloc_dma_bufs(struct slgt_info *info);
static void free_dma_bufs(struct slgt_info *info);
@@ -2321,17 +2320,13 @@ static void isr_gpio(struct slgt_info *info, unsigned int changed, unsigned int
* irq interrupt number
* dev_id device ID supplied during interrupt registration
*/
-static irqreturn_t slgt_interrupt(int irq, void *dev_id)
+static irqreturn_t slgt_interrupt(int dummy, void *dev_id)
{
- struct slgt_info *info;
+ struct slgt_info *info = dev_id;
unsigned int gsr;
unsigned int i;
- DBGISR(("slgt_interrupt irq=%d entry\n", irq));
-
- info = dev_id;
- if (!info)
- return IRQ_NONE;
+ DBGISR(("slgt_interrupt irq=%d entry\n", info->irq_level));
spin_lock(&info->lock);
@@ -2380,7 +2375,7 @@ static irqreturn_t slgt_interrupt(int irq, void *dev_id)
spin_unlock(&info->lock);
- DBGISR(("slgt_interrupt irq=%d exit\n", irq));
+ DBGISR(("slgt_interrupt irq=%d exit\n", info->irq_level));
return IRQ_HANDLED;
}
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index c63013b..f79c8b2 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -2587,9 +2587,9 @@ void isr_io_pin( SLMP_INFO *info, u16 status )
* dev_id device ID supplied during interrupt registration
* regs interrupted processor context
*/
-static irqreturn_t synclinkmp_interrupt(int irq, void *dev_id)
+static irqreturn_t synclinkmp_interrupt(int dummy, void *dev_id)
{
- SLMP_INFO * info;
+ SLMP_INFO *info = dev_id;
unsigned char status, status0, status1=0;
unsigned char dmastatus, dmastatus0, dmastatus1=0;
unsigned char timerstatus0, timerstatus1=0;
@@ -2598,12 +2598,8 @@ static irqreturn_t synclinkmp_interrupt(int irq, void *dev_id)
unsigned short tmp;
if ( debug_level >= DEBUG_LEVEL_ISR )
- printk("%s(%d): synclinkmp_interrupt(%d)entry.\n",
- __FILE__,__LINE__,irq);
-
- info = (SLMP_INFO *)dev_id;
- if (!info)
- return IRQ_NONE;
+ printk(KERN_DEBUG "%s(%d): synclinkmp_interrupt(%d)entry.\n",
+ __FILE__, __LINE__, info->irq_level);
spin_lock(&info->lock);
@@ -2616,9 +2612,9 @@ static irqreturn_t synclinkmp_interrupt(int irq, void *dev_id)
timerstatus0 = read_reg(info, ISR2);
if ( debug_level >= DEBUG_LEVEL_ISR )
- printk("%s(%d):%s status0=%02x, dmastatus0=%02x, timerstatus0=%02x\n",
- __FILE__,__LINE__,info->device_name,
- status0,dmastatus0,timerstatus0);
+ printk(KERN_DEBUG "%s(%d):%s status0=%02x, dmastatus0=%02x, timerstatus0=%02x\n",
+ __FILE__, __LINE__, info->device_name,
+ status0, dmastatus0, timerstatus0);
if (info->port_count == 4) {
/* get status for SCA1 (ports 2-3) */
@@ -2703,8 +2699,8 @@ static irqreturn_t synclinkmp_interrupt(int irq, void *dev_id)
spin_unlock(&info->lock);
if ( debug_level >= DEBUG_LEVEL_ISR )
- printk("%s(%d):synclinkmp_interrupt(%d)exit.\n",
- __FILE__,__LINE__,irq);
+ printk(KERN_DEBUG "%s(%d):synclinkmp_interrupt(%d)exit.\n",
+ __FILE__, __LINE__, info->irq_level);
return IRQ_HANDLED;
}
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index fd771a4..9e12638 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -399,7 +399,7 @@ static irqreturn_t tis_int_probe(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static irqreturn_t tis_int_handler(int irq, void *dev_id)
+static irqreturn_t tis_int_handler(int dummy, void *dev_id)
{
struct tpm_chip *chip = dev_id;
u32 interrupt;
next prev parent reply other threads:[~2007-10-21 7:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 7:52 [PATCH 0/17] various " Jeff Garzik
2007-10-21 7:52 ` [PATCH 1/17] " Jeff Garzik
2007-10-21 7:52 ` [PATCH 2/17] drivers/char/ip2: split out irq core logic into separate function Jeff Garzik
2007-10-21 7:52 ` [PATCH 3/17] drivers/char/ip2: separate polling and irq-driven work entry points Jeff Garzik
2007-10-21 7:52 ` [PATCH 4/17] char/pcmcia/synclink_cs: trim trailing whitespace Jeff Garzik
2007-10-21 7:52 ` [PATCH 5/17] drivers/char/pcmcia/synclink_cs.c: irq handler cleanups Jeff Garzik
2007-10-21 7:52 ` [PATCH 6/17] drivers/char/riscom8: " Jeff Garzik
2007-10-21 9:01 ` Jiri Slaby
2007-10-21 9:06 ` Jeff Garzik
2007-10-21 7:52 ` [PATCH 7/17] drivers/char/{rio,specialix,sx}: " Jeff Garzik
2007-10-21 7:52 ` [PATCH 8/17] arch/x86/kernel/vm86_32.c: irq handler cleanup Jeff Garzik
2007-10-21 9:21 ` Thomas Gleixner
2007-10-21 7:52 ` Jeff Garzik [this message]
2007-10-21 7:52 ` [PATCH 10/17] drivers/input/serio/i8042.c: irq handler clean Jeff Garzik
2007-10-21 17:57 ` Dmitry Torokhov
2007-10-30 12:36 ` Jeff Garzik
2007-10-21 7:52 ` [PATCH 11/17] isdn/act2000: fix major bug. clean irq handler Jeff Garzik
2007-10-21 7:52 ` [PATCH 12/17] isdn/sc: irq handler clean Jeff Garzik
2007-10-21 7:52 ` [PATCH 13/17] netdrvr irq handler cleanups Jeff Garzik
2007-10-21 7:52 ` [PATCH 14/17] pcmcia/i82365: " Jeff Garzik
2007-10-21 7:52 ` [PATCH 15/17] serial, rtc/ds1374: " Jeff Garzik
2007-10-21 7:52 ` [PATCH 16/17] SCSI: driver " Jeff Garzik
2007-10-21 7:52 ` [PATCH 17/17] RTC interrupt handling cleanups Jeff Garzik
2007-10-21 16:40 ` Mike Frysinger
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=20071021075235.25BC519041C@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®