aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-06 15:00:58 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-06 15:00:58 -0400
commitc7bec5aba52392aa8d675b8722735caf4a8b7265 (patch)
tree8087cfd2866e63fba25e18ba1fa0f374c27be4f0 /drivers/serial
parentc31f28e778ab299a5035ea2bda64f245b8915d7c (diff)
Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void* - Eliminate checks for conditions that never occur. These typically fall into two classes: 1) Checking for 'dev_id == NULL', then it is never called with NULL as an argument. 2) Checking for invalid irq number, when the only caller (the system) guarantees the irq handler is called with the proper 'irq' number argument. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/68360serial.c2
-rw-r--r--drivers/serial/jsm/jsm_neo.c2
-rw-r--r--drivers/serial/mpc52xx_uart.c10
-rw-r--r--drivers/serial/netx-serial.c2
-rw-r--r--drivers/serial/pxa.c2
5 files changed, 5 insertions, 13 deletions
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
index 4e56ec803861..634ecca36a77 100644
--- a/drivers/serial/68360serial.c
+++ b/drivers/serial/68360serial.c
@@ -620,7 +620,7 @@ static void rs_360_interrupt(int vec, void *dev_id)
620 volatile struct smc_regs *smcp; 620 volatile struct smc_regs *smcp;
621 volatile struct scc_regs *sccp; 621 volatile struct scc_regs *sccp;
622 622
623 info = (ser_info_t *)dev_id; 623 info = dev_id;
624 624
625 idx = PORT_NUM(info->state->smc_scc_num); 625 idx = PORT_NUM(info->state->smc_scc_num);
626 if (info->state->smc_scc_num & NUM_IS_SCC) { 626 if (info->state->smc_scc_num & NUM_IS_SCC) {
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c
index 8fa31e68989a..8be8da37f629 100644
--- a/drivers/serial/jsm/jsm_neo.c
+++ b/drivers/serial/jsm/jsm_neo.c
@@ -1116,7 +1116,7 @@ static void neo_param(struct jsm_channel *ch)
1116 */ 1116 */
1117static irqreturn_t neo_intr(int irq, void *voidbrd) 1117static irqreturn_t neo_intr(int irq, void *voidbrd)
1118{ 1118{
1119 struct jsm_board *brd = (struct jsm_board *) voidbrd; 1119 struct jsm_board *brd = voidbrd;
1120 struct jsm_channel *ch; 1120 struct jsm_channel *ch;
1121 int port = 0; 1121 int port = 0;
1122 int type = 0; 1122 int type = 0;
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 039c2fd6d496..4f80c5b4a753 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -512,19 +512,11 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port)
512static irqreturn_t 512static irqreturn_t
513mpc52xx_uart_int(int irq, void *dev_id) 513mpc52xx_uart_int(int irq, void *dev_id)
514{ 514{
515 struct uart_port *port = (struct uart_port *) dev_id; 515 struct uart_port *port = dev_id;
516 unsigned long pass = ISR_PASS_LIMIT; 516 unsigned long pass = ISR_PASS_LIMIT;
517 unsigned int keepgoing; 517 unsigned int keepgoing;
518 unsigned short status; 518 unsigned short status;
519 519
520 if ( irq != port->irq ) {
521 printk( KERN_WARNING
522 "mpc52xx_uart_int : " \
523 "Received wrong int %d. Waiting for %d\n",
524 irq, port->irq);
525 return IRQ_NONE;
526 }
527
528 spin_lock(&port->lock); 520 spin_lock(&port->lock);
529 521
530 /* While we have stuff to do, we continue */ 522 /* While we have stuff to do, we continue */
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index e92d7e1c22cf..062bad457b1a 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -247,7 +247,7 @@ static void netx_rxint(struct uart_port *port)
247 247
248static irqreturn_t netx_int(int irq, void *dev_id) 248static irqreturn_t netx_int(int irq, void *dev_id)
249{ 249{
250 struct uart_port *port = (struct uart_port *)dev_id; 250 struct uart_port *port = dev_id;
251 unsigned long flags; 251 unsigned long flags;
252 unsigned char status; 252 unsigned char status;
253 253
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 846089f222d4..415fe9633a9b 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -232,7 +232,7 @@ static inline void check_modem_status(struct uart_pxa_port *up)
232 */ 232 */
233static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) 233static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id)
234{ 234{
235 struct uart_pxa_port *up = (struct uart_pxa_port *)dev_id; 235 struct uart_pxa_port *up = dev_id;
236 unsigned int iir, lsr; 236 unsigned int iir, lsr;
237 237
238 iir = serial_in(up, UART_IIR); 238 iir = serial_in(up, UART_IIR);