* [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
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
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
1 sibling, 1 reply; 12+ messages in thread
From: Steve Ralston @ 2002-08-07 11:12 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-scsi
On 08/07/2002 06:37 AM, Alan Cox wrote:
>General policy - rip out version ifdefs unless the driver has a
>maintainer who actively objects ?
>
Hi Alan,
When I worked for LSI, and was actively maintaining
drivers/message/fusion/...
code, we had a single set of driver source code that compiled and ran
across lots of linux kernels (2.2.5 thru 2.4.19). Most of the
version-specific
#ifdef's were isolated to one header file (linux_compat.h). We then
also had
a set of patch files (each pretty small) that could be applied against
any explicit
kernel (in the supported range). A customer could then (in theory:-)
download
one set of driver source (including the patch file sets), untar/overlay it,
apply a single patch file, and then compile+run the drivers on any of
those kernels.
So just curious, are you saying that you'd rather have driver maintainers
maintain a separate set of driver source for each explicit kernel (with no
version-specific #ifdef's) vs. the way we did it above?
Thanks,
-SteveR
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
2002-08-07 3:59 Rusty Trivial Russell
@ 2002-08-07 11:37 ` Alan Cox
2002-08-07 11:12 ` Steve Ralston
2002-08-08 2:12 ` Rusty Russell
0 siblings, 2 replies; 12+ messages in thread
From: Alan Cox @ 2002-08-07 11:37 UTC (permalink / raw)
To: Rusty Trivial Russell; +Cc: Marcelo Tosatti, linux-scsi
On Wed, 2002-08-07 at 04:59, Rusty Trivial Russell wrote:
> [ Removes the unused warning, and since qla1280_do_dpc is only called when
> version < 2.1.95 anyway, makes the whole thing conditional ]
>
General policy - rip out version ifdefs unless the driver has a
maintainer who actively objects ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
2002-08-07 11:12 ` Steve Ralston
@ 2002-08-07 13:24 ` Alan Cox
0 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2002-08-07 13:24 UTC (permalink / raw)
To: Steve Ralston; +Cc: linux-scsi
On Wed, 2002-08-07 at 12:12, Steve Ralston wrote:
> On 08/07/2002 06:37 AM, Alan Cox wrote:
>
> >General policy - rip out version ifdefs unless the driver has a
> >maintainer who actively objects ?
> >
>
> So just curious, are you saying that you'd rather have driver maintainers
> maintain a separate set of driver source for each explicit kernel (with no
> version-specific #ifdef's) vs. the way we did it above?
If someone is maintaining them all then there are cases it makes sense
to leave the ifdefs in. Thats why I said about maintainers who actively
object. I suspect Deanna would also want the MPT fusion ifdefs left in
for example
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
2002-08-07 11:37 ` Alan Cox
2002-08-07 11:12 ` Steve Ralston
@ 2002-08-08 2:12 ` Rusty Russell
1 sibling, 0 replies; 12+ messages in thread
From: Rusty Russell @ 2002-08-08 2:12 UTC (permalink / raw)
To: Alan Cox; +Cc: Marcelo Tosatti, linux-scsi
In message <1028720225.18156.246.camel@irongate.swansea.linux.org.uk> you write
:
> On Wed, 2002-08-07 at 04:59, Rusty Trivial Russell wrote:
> > [ Removes the unused warning, and since qla1280_do_dpc is only called when
> > version < 2.1.95 anyway, makes the whole thing conditional ]
> >
>
> General policy - rip out version ifdefs unless the driver has a
> maintainer who actively objects ?
Hm, I wouldn't accept a patch to Trivial which just ripped them out.
If it was part of a larger cleanup, then sure. In this case it
doesn't change code, it just simplifies it as well as the easiest way
of fixing the warning.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ 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-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-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
@ 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
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
2003-06-23 6:47 [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c Rusty Trivial Russell
@ 2003-06-23 8:45 ` Christoph Hellwig
2003-06-23 8:51 ` Jes Sorensen
0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2003-06-23 8:45 UTC (permalink / raw)
To: Rusty Trivial Russell; +Cc: Marcelo Tosatti, Jes Sorensen, linux-scsi
On Mon, Jun 23, 2003 at 04:47:25PM +1000, Rusty Trivial Russell wrote:
> [ 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
2003-06-23 8:45 ` Christoph Hellwig
@ 2003-06-23 8:51 ` Jes Sorensen
2003-06-23 9:27 ` Rusty Russell
0 siblings, 1 reply; 12+ messages in thread
From: Jes Sorensen @ 2003-06-23 8:51 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Rusty Trivial Russell, Marcelo Tosatti, linux-scsi
>>>>> "Christoph" == Christoph Hellwig <hch@infradead.org> writes:
Christoph> On Mon, Jun 23, 2003 at 04:47:25PM +1000, Rusty Trivial
Christoph> Russell wrote:
>> [ 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c
2003-06-23 8:51 ` Jes Sorensen
@ 2003-06-23 9:27 ` Rusty Russell
0 siblings, 0 replies; 12+ messages in thread
From: Rusty Russell @ 2003-06-23 9:27 UTC (permalink / raw)
To: Jes Sorensen; +Cc: Marcelo Tosatti, linux-scsi, Christoph Hellwig
In message <m38yrtnpmy.fsf@trained-monkey.org> you write:
> 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.
^ 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 --
2003-06-23 6:47 [TRIVIAL] warning cleanup for drivers_scsi_qla1280.c Rusty Trivial Russell
2003-06-23 8:45 ` Christoph Hellwig
2003-06-23 8:51 ` Jes Sorensen
2003-06-23 9:27 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2003-02-06 3:00 Rusty Trivial Russell
2002-12-16 6:43 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