linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6
@ 2004-01-12 12:47 Jes Sorensen
  2004-01-12 15:10 ` Christoph Hellwig
  2004-01-12 15:11 ` James Bottomley
  0 siblings, 2 replies; 5+ messages in thread
From: Jes Sorensen @ 2004-01-12 12:47 UTC (permalink / raw)
  To: akpm; +Cc: linux-scsi, James.Bottomley

Hi Andrew,

Would you mind adding this patch on top of 2.6.1-mmX. It fixes a compile
problem with the 1280 driver when compiling it statically into the
kernel when CONFIG_HOTPLUG is enabled in 2.6.

Thanks,
Jes

--- orig/linux-2.6.0-test11-ia64/drivers/scsi/qla1280.c	Tue Jan  6 04:22:31 2004
+++ linux-2.6.0-test11-ia64/drivers/scsi/qla1280.c	Mon Jan 12 03:08:58 2004
@@ -20,6 +20,8 @@
 #define QLA1280_VERSION      "3.24.1"
 /*****************************************************************************
     Revision History:
+    Rev  3.24.2 January 12, 2004, Jes Sorensen
+	- Fix static compile with CONFIG_HOTPLUG enabled
     Rev  3.24.1 January 5, 2004, Jes Sorensen
 	- Initialize completion queue to avoid OOPS on probe
 	- Handle interrupts during mailbox testing
@@ -481,7 +483,7 @@
 #endif
 
 static int qla1280_probe_one(struct pci_dev *, const struct pci_device_id *);
-#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600)
+#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600) || defined(CONFIG_HOTPLUG)
 static void qla1280_remove_one(struct pci_dev *);
 #endif
 
@@ -4812,7 +4814,7 @@
 }
 
 
-#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600)
+#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600) || defined(CONFIG_HOTPLUG)
 static void __devexit
 qla1280_remove_one(struct pci_dev *pdev)
 {

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

* Re: [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6
  2004-01-12 12:47 [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6 Jes Sorensen
@ 2004-01-12 15:10 ` Christoph Hellwig
  2004-01-12 15:15   ` Jes Sorensen
  2004-01-12 15:11 ` James Bottomley
  1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2004-01-12 15:10 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: akpm, linux-scsi, James.Bottomley

On Mon, Jan 12, 2004 at 07:47:38AM -0500, Jes Sorensen wrote:
> Hi Andrew,
> 
> Would you mind adding this patch on top of 2.6.1-mmX. It fixes a compile
> problem with the 1280 driver when compiling it statically into the
> kernel when CONFIG_HOTPLUG is enabled in 2.6.

That patch is crap.  The ifdefs are gone in -mm and that's the way to go.
We have __devexit and __devexitp to take care of that.


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

* Re: [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6
  2004-01-12 12:47 [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6 Jes Sorensen
  2004-01-12 15:10 ` Christoph Hellwig
@ 2004-01-12 15:11 ` James Bottomley
  1 sibling, 0 replies; 5+ messages in thread
From: James Bottomley @ 2004-01-12 15:11 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: Andrew Morton, SCSI Mailing List

On Mon, 2004-01-12 at 07:47, Jes Sorensen wrote:
> -#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600)
> +#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600) || defined(CONFIG_HOTPLUG)

I'm not very keen on this.  It's mated with the

	.remove = __devexit_p(qla1280_remove_one)

so you're second guessing the __devexit_p() semantics with #ifdefs

In what scenario does the __devexit declaration of the function fail? 
In the 2.6 kernel, which the #ifdef's are looking for, it should be
placed into a discard section and thus be taken out at link time.

James





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

* Re: [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6
  2004-01-12 15:10 ` Christoph Hellwig
@ 2004-01-12 15:15   ` Jes Sorensen
  2004-01-12 19:37     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Jes Sorensen @ 2004-01-12 15:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: akpm, linux-scsi, James.Bottomley

>>>>> "Christoph" == Christoph Hellwig <hch@infradead.org> writes:

Christoph> On Mon, Jan 12, 2004 at 07:47:38AM -0500, Jes Sorensen
Christoph> wrote:
>> Hi Andrew,
>> 
>> Would you mind adding this patch on top of 2.6.1-mmX. It fixes a
>> compile problem with the 1280 driver when compiling it statically
>> into the kernel when CONFIG_HOTPLUG is enabled in 2.6.

Christoph> That patch is crap.  The ifdefs are gone in -mm and that's
Christoph> the way to go.  We have __devexit and __devexitp to take
Christoph> care of that.

If that works in 2.4 fine - send me a patch please.

Jes

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

* Re: [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6
  2004-01-12 15:15   ` Jes Sorensen
@ 2004-01-12 19:37     ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2004-01-12 19:37 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: akpm, linux-scsi, James.Bottomley

On Mon, Jan 12, 2004 at 10:15:12AM -0500, Jes Sorensen wrote:
> Christoph> That patch is crap.  The ifdefs are gone in -mm and that's
> Christoph> the way to go.  We have __devexit and __devexitp to take
> Christoph> care of that.
> 
> If that works in 2.4 fine - send me a patch please.

the __devexit does not work in 2.4 due to the scsi layer function calling
qla1280_remove_one not beeing __devexit, but we already #define it away
in qla1280.c when we're compiling in 2.4.  The patch to just remove the
ifdefs already is in Andrew's patch, I think Adrian sent it you when
he found that issue, too (?)


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

end of thread, other threads:[~2004-01-12 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-12 12:47 [patch] qla1280 compile fix for CONFIG_HOTPLUG in 2.6 Jes Sorensen
2004-01-12 15:10 ` Christoph Hellwig
2004-01-12 15:15   ` Jes Sorensen
2004-01-12 19:37     ` Christoph Hellwig
2004-01-12 15:11 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).