Skip to contentSkip to conversation

net: fix compilation NG when !CONFIG_MODULE

PATCH Applied [email protected] 3 participants 4 messages Sep 22, 2008 – Sep 23, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/8 net: fix compilation NG when !CONFIG_MODULE

From: Hiroshi Shimamoto <[email protected]>

CC net/core/dev.o
net/core/dev.c:1001: error: redefinition of 'dev_load' include/linux/netdevice.h:1645: error: previous definition of 'dev_load' was here make[2]: *** [net/core/dev.o] Error 1

dev_load() is not used when CONFIG_MODULE disabled.

---

 net/core/dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/core/dev.c renamed from net/core/dev.c~net-fix-compilation-ng-when-config_module +2 -1
diff -puN net/core/dev.c~net-fix-compilation-ng-when-config_module net/core/dev.c
@@ -997,7 +997,7 @@ EXPORT_SYMBOL(netdev_bonding_change);
  *	privileges this function loads the module. If module loading is not
  *	available in this kernel then it becomes a nop.
  */
-
+#ifdef CONFIG_MODULES
 void dev_load(struct net *net, const char *name)
 {
 	struct net_device *dev;
@@ -1009,6 +1009,7 @@ void dev_load(struct net *net, const cha
 	if (!dev && capable(CAP_SYS_MODULE))
 		request_module("%s", name);
 }
+#endif
 
 /**
  *	dev_open	- prepare an interface for use.

_

maintainer
#1 lore raw

From: [email protected]
Date: Mon, 22 Sep 2008 14:50:35 -0700

Quoted 11 lines

From: Hiroshi Shimamoto <[email protected]>

CC net/core/dev.o
net/core/dev.c:1001: error: redefinition of 'dev_load' include/linux/netdevice.h:1645: error: previous definition of 'dev_load' was here make[2]: *** [net/core/dev.o] Error 1

dev_load() is not used when CONFIG_MODULE disabled.

Andrew, this problem got introduced by a tree other than networking. Please push this to whatever subsystem tree added that dev_load dummy decl in include/linux/netdevice.h

I don't see it in any trees I have here.

#2 lore raw
Quoted 12 lines · On Mon, 22 Sep 2008 19:00:52 -0700 (PDT) David Miller <[email protected]>…

From: [email protected]
Date: Mon, 22 Sep 2008 14:50:35 -0700

Quoted 9 lines

From: Hiroshi Shimamoto <[email protected]>

CC net/core/dev.o
net/core/dev.c:1001: error: redefinition of 'dev_load' include/linux/netdevice.h:1645: error: previous definition of 'dev_load' was here make[2]: *** [net/core/dev.o] Error 1

dev_load() is not used when CONFIG_MODULE disabled.

Quoted 8 lines
Quoted 2 lines

Andrew, this problem got introduced by a tree other than networking. Please push this to whatever subsystem tree added that dev_load dummy decl in include/linux/netdevice.h

I don't see it in any trees I have here.

OK, I don't see the failure either, so I assume that whichever tree busted things (rusty?) was indepentently fixed. I'll drop it, thanks.

#3 lore raw
Quoted 17 lines · Andrew Morton
Quoted 15 lines · On Mon, 22 Sep 2008 19:00:52 -0700 (PDT) David Miller <[email protected]>…

From: [email protected]
Date: Mon, 22 Sep 2008 14:50:35 -0700

Quoted 11 lines

From: Hiroshi Shimamoto <[email protected]>

CC net/core/dev.o
net/core/dev.c:1001: error: redefinition of 'dev_load' include/linux/netdevice.h:1645: error: previous definition of 'dev_load' was here make[2]: *** [net/core/dev.o] Error 1

dev_load() is not used when CONFIG_MODULE disabled.

Quoted 8 lines
Quoted 5 lines

Andrew, this problem got introduced by a tree other than networking. Please push this to whatever subsystem tree added that dev_load dummy decl in include/linux/netdevice.h

I don't see it in any trees I have here.

OK, I don't see the failure either, so I assume that whichever tree busted things (rusty?) was indepentently fixed. I'll drop it, thanks.

You asked Rusty to fix it on 2008-SEP-08 here:
http://marc.info/?l=linux-kernel&m=122091240810285&w=2
and Alexey D.'s patch is here:
http://marc.info/?l=linux-netdev&m=122064308827637&w=2

Signature · 1 line
~Randy