public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] 2.6.1-rc2-mm1: qla1280.c doesn't compile
       [not found] <20040107232831.13261f76.akpm@osdl.org>
@ 2004-01-09  1:52 ` Adrian Bunk
  2004-01-09 13:49   ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2004-01-09  1:52 UTC (permalink / raw)
  To: Andrew Morton, Jes Sorensen, Christoph Hellwig; +Cc: linux-kernel, linux-scsi

On Wed, Jan 07, 2004 at 11:28:31PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.1-rc1-mm2:
>...
> -qla1280-update.patch
> +qla1280-update-2.patch
> 
>  Updated qlogic patch
>...

I got the following compile error when trying to compile this driver 
statically into a kernel with hotplug enabled:


<--  snip  -->

...
drivers/scsi/qla1280.c:4849: error: `qla1280_remove_one' undeclared here 
(not in a function)
drivers/scsi/qla1280.c:4849: error: initializer element is not constant
drivers/scsi/qla1280.c:4849: error: (near initialization for 
`qla1280_pci_driver.remove')
make[2]: *** [drivers/scsi/qla1280.o] Error 1

<--  snip  -->


Since I don't see a good reason why qla1280_remove_one is #ifdef'ed out 
in the non-modular case the patch below fixes this problem by removing 
two #ifdef's.


cu
Adrian


--- linux-2.6.1-rc2-mm1/drivers/scsi/qla1280.c.old	2004-01-08 22:40:54.000000000 +0100
+++ linux-2.6.1-rc2-mm1/drivers/scsi/qla1280.c	2004-01-08 22:42:46.000000000 +0100
@@ -480,9 +480,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)
 static void qla1280_remove_one(struct pci_dev *);
-#endif
 
 /*
  *  QLogic Driver Support Function Prototypes.
@@ -4807,7 +4805,6 @@
 }
 
 
-#if defined(CONFIG_SCSI_QLOGIC_1280_MODULE) || (LINUX_VERSION_CODE < 0x020600)
 static void __devexit
 qla1280_remove_one(struct pci_dev *pdev)
 {
@@ -4839,7 +4836,6 @@
 
 	scsi_host_put(host);
 }
-#endif
 
 #if LINUX_VERSION_CODE >= 0x020600
 static struct pci_driver qla1280_pci_driver = {

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

* Re: [patch] 2.6.1-rc2-mm1: qla1280.c doesn't compile
  2004-01-09  1:52 ` [patch] 2.6.1-rc2-mm1: qla1280.c doesn't compile Adrian Bunk
@ 2004-01-09 13:49   ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2004-01-09 13:49 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Andrew Morton, Jes Sorensen, Christoph Hellwig, linux-kernel,
	linux-scsi

On Fri, Jan 09, 2004 at 02:52:30AM +0100, Adrian Bunk wrote:
> I got the following compile error when trying to compile this driver 
> statically into a kernel with hotplug enabled:

Jes, that's your ifdef-magic around around qla1280_remove_one.. Do you
remember why you added it?  The only case we don't need it is when
the driver is builtin and CONFIG_HOTPLUG is not set - and in that case
__devexit should get rid of it for us.

> Since I don't see a good reason why qla1280_remove_one is #ifdef'ed out 
> in the non-modular case the patch below fixes this problem by removing 
> two #ifdef's.

The patch looks good to me.  In fact that's how it was in the patch
I sent to Jes..

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

end of thread, other threads:[~2004-01-09 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040107232831.13261f76.akpm@osdl.org>
2004-01-09  1:52 ` [patch] 2.6.1-rc2-mm1: qla1280.c doesn't compile Adrian Bunk
2004-01-09 13:49   ` Christoph Hellwig

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