Skip to contentSkip to conversation

warning cleanup for drivers_scsi_qla1280.c

TRIVIAL Rusty Trivial Russell 3 participants 4 messages Jun 23, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Eric Sandeen <[email protected]>

drivers/scsi/qla1280.c renamed from drivers/scsi/qla1280.c.orig +4 -9
@@ -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
Signature · 3 lines
  What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
  Don't blame me: the Monkey is driving
  File: Eric Sandeen <[email protected]>: warning cleanup for drivers_scsi_qla1280.c
#1 lore raw
Quoted 2 lines · Rusty Trivial Russell

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

I'd say kill it completly. qlogic has stopped maintaining the driver and there's other places in the driver that won't work anymore with 2.0.

#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Christoph" == Christoph Hellwig <[email protected]> writes:

Christoph> On Mon, Jun 23, 2003 at 04:47:25PM +1000, Rusty Trivial

Quoted 2 lines · Christoph> Russell wrote:
Quoted 2 lines

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

Christoph> I'd say kill it completly. qlogic has stopped maintaining Christoph> the driver and there's other places in the driver that Christoph> won't work anymore with 2.0.

Hi Christoph and Rusty

The current qla1280 codebase found in 2.4 is utter rubbish. I have a major cleanup of it almost ready in which I already killed all the < 2.4.x support.

I hope to get this new version out shortly, so this patch is probably obsolete.

Cheers,
Jes

#3 lore raw

In message <[email protected]> you write:

Quoted 2 lines

I hope to get this new version out shortly, so this patch is probably obsolete.

Thanks Jes, and Christoph!

I've closed the patch.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.