* drivers/scsi/advansys.c - ld error ( Re: 2.6.23-rc3-mm1 )
[not found] <20070822020648.5ea3a612.akpm@linux-foundation.org>
@ 2007-08-22 16:15 ` Gabriel C
2007-08-22 16:28 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel C @ 2007-08-22 16:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Matthew Wilcox, linux-scsi
CONFIG_SCSI_ADVANSYS=y && CONFIG_ISA=n results in :
...
drivers/built-in.o: In function `advansys_init':
advansys.c:(.init.text+0x38ea): undefined reference to `isa_register_driver'
advansys.c:(.init.text+0x38ff): undefined reference to `isa_register_driver'
advansys.c:(.init.text+0x3926): undefined reference to `isa_unregister_driver'
advansys.c:(.init.text+0x3930): undefined reference to `isa_unregister_driver'
drivers/built-in.o: In function `advansys_exit':
advansys.c:(.exit.text+0x340): undefined reference to `isa_unregister_driver'
advansys.c:(.exit.text+0x34a): undefined reference to `isa_unregister_driver'
make: *** [.tmp_vmlinux1] Error 1
...
I guess advansys_{init,exit} is missing some #ifdef's ..
config : http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/r/randconfig-9
Gabriel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/scsi/advansys.c - ld error ( Re: 2.6.23-rc3-mm1 )
2007-08-22 16:15 ` drivers/scsi/advansys.c - ld error ( Re: 2.6.23-rc3-mm1 ) Gabriel C
@ 2007-08-22 16:28 ` Matthew Wilcox
2007-08-22 16:57 ` Gabriel C
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2007-08-22 16:28 UTC (permalink / raw)
To: Gabriel C; +Cc: Andrew Morton, linux-kernel, linux-scsi
On Wed, Aug 22, 2007 at 06:15:14PM +0200, Gabriel C wrote:
> advansys.c:(.init.text+0x38ea): undefined reference to `isa_register_driver'
> I guess advansys_{init,exit} is missing some #ifdef's ..
That's one conclusion. I prefer to think that the ISA support should
behave the same as the PCI and EISA support:
----
When CONFIG_ISA is disabled, the isa_driver support will not be compiled
in. Define stubs so that we don't get link-time errors.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 1b85533..b0270e3 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -22,7 +22,18 @@ struct isa_driver {
#define to_isa_driver(x) container_of((x), struct isa_driver, driver)
+#ifdef CONFIG_ISA
int isa_register_driver(struct isa_driver *, unsigned int);
void isa_unregister_driver(struct isa_driver *);
+#else
+static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
+{
+ return 0;
+}
+
+static inline void isa_unregister_driver(struct isa_driver *d)
+{
+}
+#endif
#endif /* __LINUX_ISA_H */
--
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: drivers/scsi/advansys.c - ld error ( Re: 2.6.23-rc3-mm1 )
2007-08-22 16:28 ` Matthew Wilcox
@ 2007-08-22 16:57 ` Gabriel C
0 siblings, 0 replies; 3+ messages in thread
From: Gabriel C @ 2007-08-22 16:57 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Andrew Morton, linux-kernel, linux-scsi
Matthew Wilcox wrote:
> On Wed, Aug 22, 2007 at 06:15:14PM +0200, Gabriel C wrote:
>> advansys.c:(.init.text+0x38ea): undefined reference to `isa_register_driver'
>> I guess advansys_{init,exit} is missing some #ifdef's ..
>
> That's one conclusion. I prefer to think that the ISA support should
> behave the same as the PCI and EISA support:
Yes right , your patch fixes the problem.
>
> ----
>
> When CONFIG_ISA is disabled, the isa_driver support will not be compiled
> in. Define stubs so that we don't get link-time errors.
>
> Signed-off-by: Matthew Wilcox <matthew@wil.cx>
>
> diff --git a/include/linux/isa.h b/include/linux/isa.h
> index 1b85533..b0270e3 100644
> --- a/include/linux/isa.h
> +++ b/include/linux/isa.h
> @@ -22,7 +22,18 @@ struct isa_driver {
>
> #define to_isa_driver(x) container_of((x), struct isa_driver, driver)
>
> +#ifdef CONFIG_ISA
> int isa_register_driver(struct isa_driver *, unsigned int);
> void isa_unregister_driver(struct isa_driver *);
> +#else
> +static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
> +{
> + return 0;
> +}
> +
> +static inline void isa_unregister_driver(struct isa_driver *d)
> +{
> +}
> +#endif
>
> #endif /* __LINUX_ISA_H */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-22 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070822020648.5ea3a612.akpm@linux-foundation.org>
2007-08-22 16:15 ` drivers/scsi/advansys.c - ld error ( Re: 2.6.23-rc3-mm1 ) Gabriel C
2007-08-22 16:28 ` Matthew Wilcox
2007-08-22 16:57 ` Gabriel C
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).