Skip to contentSkip to conversation

2.6.6-mm2

PATCH Martin J. Bligh 3 participants 3 messages May 13, 2004

lore
Share & tools
lore
#0 lore raw

2.6.6-mm2 won't compile without CONFIG_MODULE_UNLOAD ... looks very much like the first definition of add_attribute needs moving inside the ifdef.

kernel/module.c:730: redefinition of add_attribute' kernel/module.c:382: add_attribute' previously defined here {standard input}: Assembler messages:
{standard input}:1121: Error: symbol `add_attribute' is already defined

# grep MODULE .config
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
kernel/module.c renamed from kernel/module.c.old +1 -1
@@ -378,6 +378,7 @@
 }
 #endif /* CONFIG_SMP */
 
+#ifdef CONFIG_MODULE_UNLOAD
 static int add_attribute(struct module *mod, struct kernel_param *kp)
 {
 	struct module_attribute *a;
@@ -394,7 +395,6 @@
 	return retval;
 }
 
-#ifdef CONFIG_MODULE_UNLOAD
 /* Init the unload section of the module. */
 static void module_unload_init(struct module *mod)
 {
#1 lore raw
Quoted 6 lines · Martin J. Bligh

2.6.6-mm2 won't compile without CONFIG_MODULE_UNLOAD ... looks very much like the first definition of add_attribute needs moving inside the ifdef.

kernel/module.c:730: redefinition of add_attribute' kernel/module.c:382: add_attribute' previously defined here

Yup, sorry. Please revert bk-driver-core-module-fix.patch

#2 lore raw
In reply to Martin J. Bligh
Quoted 3 lines · Martin J. Bligh

2.6.6-mm2 won't compile without CONFIG_MODULE_UNLOAD ... looks very much like the first definition of add_attribute needs moving inside the ifdef.
...

http://www.ussg.iu.edu/hypermail/linux/kernel/0405.1/1222.html

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed