aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ultrastor.c
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/scsi/ultrastor.c
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/scsi/ultrastor.c')
-rw-r--r--drivers/scsi/ultrastor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c
index 107f0fc34949..56906aba5ee3 100644
--- a/drivers/scsi/ultrastor.c
+++ b/drivers/scsi/ultrastor.c
@@ -287,7 +287,7 @@ static const unsigned short ultrastor_ports_14f[] = {
287}; 287};
288#endif 288#endif
289 289
290static void ultrastor_interrupt(int, void *); 290static void ultrastor_interrupt(void *);
291static irqreturn_t do_ultrastor_interrupt(int, void *); 291static irqreturn_t do_ultrastor_interrupt(int, void *);
292static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt); 292static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt);
293 293
@@ -893,7 +893,7 @@ static int ultrastor_abort(struct scsi_cmnd *SCpnt)
893 893
894 spin_lock_irqsave(host->host_lock, flags); 894 spin_lock_irqsave(host->host_lock, flags);
895 /* FIXME: Ewww... need to think about passing host around properly */ 895 /* FIXME: Ewww... need to think about passing host around properly */
896 ultrastor_interrupt(0, NULL); 896 ultrastor_interrupt(NULL);
897 spin_unlock_irqrestore(host->host_lock, flags); 897 spin_unlock_irqrestore(host->host_lock, flags);
898 return SUCCESS; 898 return SUCCESS;
899 } 899 }
@@ -1039,7 +1039,7 @@ int ultrastor_biosparam(struct scsi_device *sdev, struct block_device *bdev,
1039 return 0; 1039 return 0;
1040} 1040}
1041 1041
1042static void ultrastor_interrupt(int irq, void *dev_id) 1042static void ultrastor_interrupt(void *dev_id)
1043{ 1043{
1044 unsigned int status; 1044 unsigned int status;
1045#if ULTRASTOR_MAX_CMDS > 1 1045#if ULTRASTOR_MAX_CMDS > 1
@@ -1177,7 +1177,7 @@ static irqreturn_t do_ultrastor_interrupt(int irq, void *dev_id)
1177 struct Scsi_Host *dev = dev_id; 1177 struct Scsi_Host *dev = dev_id;
1178 1178
1179 spin_lock_irqsave(dev->host_lock, flags); 1179 spin_lock_irqsave(dev->host_lock, flags);
1180 ultrastor_interrupt(irq, dev_id); 1180 ultrastor_interrupt(dev_id);
1181 spin_unlock_irqrestore(dev->host_lock, flags); 1181 spin_unlock_irqrestore(dev->host_lock, flags);
1182 return IRQ_HANDLED; 1182 return IRQ_HANDLED;
1183} 1183}