netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sdla non-module build fix.
       [not found] ` <3F5B7ED7.2070908@pobox.com>
@ 2003-09-08 16:57   ` Stephen Hemminger
  2003-09-08 17:32     ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2003-09-08 16:57 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linus Torvalds, netdev

Last round of changes broke sdla build if not a module.

diff -Nru a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
--- a/drivers/net/wan/sdla.c	Mon Sep  8 09:49:56 2003
+++ b/drivers/net/wan/sdla.c	Mon Sep  8 09:49:56 2003
@@ -1719,9 +1719,9 @@
 	
 	unregister_frad(devname);
 }
-#endif
 
 MODULE_LICENSE("GPL");
 
 module_init(init_sdla);
 module_exit(exit_sdla);
+#endif

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

* Re: [PATCH] sdla non-module build fix.
  2003-09-08 16:57   ` [PATCH] sdla non-module build fix Stephen Hemminger
@ 2003-09-08 17:32     ` Linus Torvalds
  2003-09-08 17:33       ` Stephen Hemminger
  2003-09-08 17:36       ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Torvalds @ 2003-09-08 17:32 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jeff Garzik, netdev


On Mon, 8 Sep 2003, Stephen Hemminger wrote:
>
> Last round of changes broke sdla build if not a module.

This patch can't be right. It may fix the compile, but it looks like 
init/exit_sdla is never registered at all if it's built-in.

I suspect the whole #ifdef should go away. A driver that does things 
differently depending on whether it is a module or not is generally a 
_broken_ driver.

		Linus

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

* Re: [PATCH] sdla non-module build fix.
  2003-09-08 17:32     ` Linus Torvalds
@ 2003-09-08 17:33       ` Stephen Hemminger
  2003-09-08 17:36       ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2003-09-08 17:33 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Garzik, netdev

On Mon, 8 Sep 2003 10:32:26 -0700 (PDT)
Linus Torvalds <torvalds@osdl.org> wrote:

> 
> On Mon, 8 Sep 2003, Stephen Hemminger wrote:
> >
> > Last round of changes broke sdla build if not a module.
> 
> This patch can't be right. It may fix the compile, but it looks like 
> init/exit_sdla is never registered at all if it's built-in.
> 
> I suspect the whole #ifdef should go away. A driver that does things 
> differently depending on whether it is a module or not is generally a 
> _broken_ driver.
> 
> 		Linus

The registration for non-modular takes place via drivers/net/Space.c 
calling sdla_init like it always did.

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

* Re: [PATCH] sdla non-module build fix.
  2003-09-08 17:32     ` Linus Torvalds
  2003-09-08 17:33       ` Stephen Hemminger
@ 2003-09-08 17:36       ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2003-09-08 17:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Stephen Hemminger, netdev

On Mon, Sep 08, 2003 at 10:32:26AM -0700, Linus Torvalds wrote:
> 
> On Mon, 8 Sep 2003, Stephen Hemminger wrote:
> >
> > Last round of changes broke sdla build if not a module.
> 
> This patch can't be right. It may fix the compile, but it looks like 
> init/exit_sdla is never registered at all if it's built-in.
> 
> I suspect the whole #ifdef should go away. A driver that does things 
> differently depending on whether it is a module or not is generally a 
> _broken_ driver.

Nope, this is one of those weird two-ways-of-initialization things, like
drivers/net/Space.c or drivers/video/fbmem.c.  If you look at the sdla
code, just above where Stephen's patch's context ends, you see
"sdla_init" which is called by both modular and non-modular code.

So -- with the exception of #ifdef'ing out MODULE_LICENSE, Stephen's
patch is ok.

Now that said, this situation is only temporary, until we get all the
network device structs being allocated dynamically, and interface
ordering issues are resolved.  Once that happens, you are absolutely
right:  sdla's #ifdef MODULE should be removed.

	Jeff

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

end of thread, other threads:[~2003-09-08 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.44.0309071117290.21192-200000@home.osdl.org>
     [not found] ` <3F5B7ED7.2070908@pobox.com>
2003-09-08 16:57   ` [PATCH] sdla non-module build fix Stephen Hemminger
2003-09-08 17:32     ` Linus Torvalds
2003-09-08 17:33       ` Stephen Hemminger
2003-09-08 17:36       ` Jeff Garzik

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).