public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
@ 2002-12-16  6:43 Rusty Trivial Russell
  0 siblings, 0 replies; 12+ messages in thread
From: Rusty Trivial Russell @ 2002-12-16  6:43 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-scsi

[ Indeed, the only call to qla1280_do_dpc is already inside 
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,95), so this changes nothing ]

From:  Eric Sandeen <sandeen@sgi.com>


--- trivial-2.4.21-pre1/drivers/scsi/qla1280.c.orig	2002-12-16 17:22:08.000000000 +1100
+++ trivial-2.4.21-pre1/drivers/scsi/qla1280.c	2002-12-16 17:22:08.000000000 +1100
@@ -312,7 +312,9 @@
 STATIC int qla1280_return_status( sts_entry_t *sts, Scsi_Cmnd       *cp);
 STATIC void qla1280_removeq(scsi_lu_t *q, srb_t *sp);
 STATIC void qla1280_mem_free(scsi_qla_host_t *ha);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p);
+#endif
 #ifdef  QLA1280_UNUSED 
 static void qla1280_set_flags(char * s);
 #endif
@@ -1611,17 +1613,12 @@
  * "host->can_queue". This can cause a panic if we were in our interrupt
  * code .
  **************************************************************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p)
 {
     scsi_qla_host_t *ha = (scsi_qla_host_t *) p;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    unsigned long cpu_flags = 0;
-#endif
 
     COMTRACE('p')  
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_lock_irqsave(&io_request_lock, cpu_flags);
-#endif
     if (ha->flags.isp_abort_needed)
         qla1280_abort_isp(ha);
 
@@ -1631,10 +1628,8 @@
     if (ha->done_q_first)
         qla1280_done(ha, (srb_t **)&ha->done_q_first, (srb_t **)&ha->done_q_last);
     ha->flags.dpc_sched = FALSE;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_unlock_irqrestore(&io_request_lock, cpu_flags);
-#endif
 }
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95) */
 
 /**************************************************************************
  *   qla1280_device_queue_depth
-- 
  Don't blame me: the Monkey is driving
  File: Eric Sandeen <sandeen@sgi.com>: warning cleanup for drivers_scsi_qla1280.c

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
@ 2003-06-23  6:47 Rusty Trivial Russell
  2003-06-23  8:45 ` Christoph Hellwig
  0 siblings, 1 reply; 12+ messages in thread
From: Rusty Trivial Russell @ 2003-06-23  6:47 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Jes Sorensen, linux-scsi

[ This function is unused if kernel > 2.1.95, so put #ifdef around whole thing
  to avoid warning. --RR ]

From:  Eric Sandeen <sandeen@sgi.com>


--- trivial-2.4.22-pre1/drivers/scsi/qla1280.c.orig	2003-06-23 16:39:22.000000000 +1000
+++ trivial-2.4.22-pre1/drivers/scsi/qla1280.c	2003-06-23 16:39:22.000000000 +1000
@@ -312,7 +312,9 @@
 STATIC int qla1280_return_status( sts_entry_t *sts, Scsi_Cmnd       *cp);
 STATIC void qla1280_removeq(scsi_lu_t *q, srb_t *sp);
 STATIC void qla1280_mem_free(scsi_qla_host_t *ha);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p);
+#endif
 #ifdef  QLA1280_UNUSED 
 static void qla1280_set_flags(char * s);
 #endif
@@ -1611,17 +1613,12 @@
  * "host->can_queue". This can cause a panic if we were in our interrupt
  * code .
  **************************************************************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p)
 {
     scsi_qla_host_t *ha = (scsi_qla_host_t *) p;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    unsigned long cpu_flags = 0;
-#endif
 
     COMTRACE('p')  
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_lock_irqsave(&io_request_lock, cpu_flags);
-#endif
     if (ha->flags.isp_abort_needed)
         qla1280_abort_isp(ha);
 
@@ -1631,10 +1628,8 @@
     if (ha->done_q_first)
         qla1280_done(ha, (srb_t **)&ha->done_q_first, (srb_t **)&ha->done_q_last);
     ha->flags.dpc_sched = FALSE;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_unlock_irqrestore(&io_request_lock, cpu_flags);
-#endif
 }
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95) */
 
 /**************************************************************************
  *   qla1280_device_queue_depth
-- 
  What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
  Don't blame me: the Monkey is driving
  File: Eric Sandeen <sandeen@sgi.com>: warning cleanup for drivers_scsi_qla1280.c

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
@ 2003-02-06  3:00 Rusty Trivial Russell
  0 siblings, 0 replies; 12+ messages in thread
From: Rusty Trivial Russell @ 2003-02-06  3:00 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Jes Sorensen, linux-scsi

From:  Eric Sandeen <sandeen@sgi.com>


--- trivial-2.4.21-pre4/drivers/scsi/qla1280.c.orig	2003-02-06 13:53:42.000000000 +1100
+++ trivial-2.4.21-pre4/drivers/scsi/qla1280.c	2003-02-06 13:53:42.000000000 +1100
@@ -312,7 +312,9 @@
 STATIC int qla1280_return_status( sts_entry_t *sts, Scsi_Cmnd       *cp);
 STATIC void qla1280_removeq(scsi_lu_t *q, srb_t *sp);
 STATIC void qla1280_mem_free(scsi_qla_host_t *ha);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p);
+#endif
 #ifdef  QLA1280_UNUSED 
 static void qla1280_set_flags(char * s);
 #endif
@@ -1611,17 +1613,12 @@
  * "host->can_queue". This can cause a panic if we were in our interrupt
  * code .
  **************************************************************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p)
 {
     scsi_qla_host_t *ha = (scsi_qla_host_t *) p;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    unsigned long cpu_flags = 0;
-#endif
 
     COMTRACE('p')  
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_lock_irqsave(&io_request_lock, cpu_flags);
-#endif
     if (ha->flags.isp_abort_needed)
         qla1280_abort_isp(ha);
 
@@ -1631,10 +1628,8 @@
     if (ha->done_q_first)
         qla1280_done(ha, (srb_t **)&ha->done_q_first, (srb_t **)&ha->done_q_last);
     ha->flags.dpc_sched = FALSE;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_unlock_irqrestore(&io_request_lock, cpu_flags);
-#endif
 }
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95) */
 
 /**************************************************************************
  *   qla1280_device_queue_depth
-- 
  Don't blame me: the Monkey is driving
  File: Eric Sandeen <sandeen@sgi.com>: warning cleanup for drivers_scsi_qla1280.c

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
@ 2002-08-20  8:33 Rusty Trivial Russell
  0 siblings, 0 replies; 12+ messages in thread
From: Rusty Trivial Russell @ 2002-08-20  8:33 UTC (permalink / raw)
  To: marcelo, linux-scsi

[ Hasn't been touched in years, but this cleans up an "unused" warning
  the simplest way (make the whole function dependent on kernel
  version, since its only call is ]


From:  Eric Sandeen <sandeen@sgi.com>


--- trivial-2.4.20-pre4/drivers/scsi/qla1280.c.orig	2002-08-20 18:00:34.000000000 +1000
+++ trivial-2.4.20-pre4/drivers/scsi/qla1280.c	2002-08-20 18:00:34.000000000 +1000
@@ -312,7 +312,9 @@
 STATIC int qla1280_return_status( sts_entry_t *sts, Scsi_Cmnd       *cp);
 STATIC void qla1280_removeq(scsi_lu_t *q, srb_t *sp);
 STATIC void qla1280_mem_free(scsi_qla_host_t *ha);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p);
+#endif
 #ifdef  QLA1280_UNUSED 
 static void qla1280_set_flags(char * s);
 #endif
@@ -1611,17 +1613,12 @@
  * "host->can_queue". This can cause a panic if we were in our interrupt
  * code .
  **************************************************************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p)
 {
     scsi_qla_host_t *ha = (scsi_qla_host_t *) p;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    unsigned long cpu_flags = 0;
-#endif
 
     COMTRACE('p')  
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_lock_irqsave(&io_request_lock, cpu_flags);
-#endif
     if (ha->flags.isp_abort_needed)
         qla1280_abort_isp(ha);
 
@@ -1631,10 +1628,8 @@
     if (ha->done_q_first)
         qla1280_done(ha, (srb_t **)&ha->done_q_first, (srb_t **)&ha->done_q_last);
     ha->flags.dpc_sched = FALSE;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_unlock_irqrestore(&io_request_lock, cpu_flags);
-#endif
 }
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95) */
 
 /**************************************************************************
  *   qla1280_device_queue_depth
-- 
  Don't blame me: the Monkey is driving
  File: Eric Sandeen <sandeen@sgi.com>: warning cleanup for drivers_scsi_qla1280.c

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
@ 2002-08-07  3:59 Rusty Trivial Russell
  2002-08-07 11:37 ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Rusty Trivial Russell @ 2002-08-07  3:59 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-scsi

[ Removes the unused warning, and since qla1280_do_dpc is only called when
  version < 2.1.95 anyway, makes the whole thing conditional ]

From:  Eric Sandeen <sandeen@sgi.com>


--- trivial-2.4.20-pre1/drivers/scsi/qla1280.c.orig	2002-08-07 10:57:25.000000000 +1000
+++ trivial-2.4.20-pre1/drivers/scsi/qla1280.c	2002-08-07 10:57:25.000000000 +1000
@@ -312,7 +312,9 @@
 STATIC int qla1280_return_status( sts_entry_t *sts, Scsi_Cmnd       *cp);
 STATIC void qla1280_removeq(scsi_lu_t *q, srb_t *sp);
 STATIC void qla1280_mem_free(scsi_qla_host_t *ha);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p);
+#endif
 #ifdef  QLA1280_UNUSED 
 static void qla1280_set_flags(char * s);
 #endif
@@ -1611,17 +1613,12 @@
  * "host->can_queue". This can cause a panic if we were in our interrupt
  * code .
  **************************************************************************/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95)
 static void qla1280_do_dpc(void *p)
 {
     scsi_qla_host_t *ha = (scsi_qla_host_t *) p;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    unsigned long cpu_flags = 0;
-#endif
 
     COMTRACE('p')  
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_lock_irqsave(&io_request_lock, cpu_flags);
-#endif
     if (ha->flags.isp_abort_needed)
         qla1280_abort_isp(ha);
 
@@ -1631,10 +1628,8 @@
     if (ha->done_q_first)
         qla1280_done(ha, (srb_t **)&ha->done_q_first, (srb_t **)&ha->done_q_last);
     ha->flags.dpc_sched = FALSE;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,95)
-    spin_unlock_irqrestore(&io_request_lock, cpu_flags);
-#endif
 }
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,95) */
 
 /**************************************************************************
  *   qla1280_device_queue_depth
-- 
  Don't blame me: the Monkey is driving

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-06-23  9:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-16  6:43 [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c Rusty Trivial Russell
  -- strict thread matches above, loose matches on Subject: below --
2003-06-23  6:47 Rusty Trivial Russell
2003-06-23  8:45 ` Christoph Hellwig
2003-06-23  8:51   ` Jes Sorensen
2003-06-23  9:27     ` Rusty Russell
2003-02-06  3:00 Rusty Trivial Russell
2002-08-20  8:33 Rusty Trivial Russell
2002-08-07  3:59 Rusty Trivial Russell
2002-08-07 11:37 ` Alan Cox
2002-08-07 11:12   ` Steve Ralston
2002-08-07 13:24     ` Alan Cox
2002-08-08  2:12   ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox