From: Matthew Dobson <colpatch@us.ibm.com>

I get this warning compiling 2.6.12-rc6-mm1:

kernel/module.c:404: warning: `modinfo_attrs' defined but not used

The attached patch fixes the warning, which I guess was sort of caused by
me.  I was having compilation problems on -rc5-mm2 and I sent a patch to
move some definitions outside an ifdef.  Now the code only uses those
definitions INSIDE appropriately ifdef'd sections, so we get a warning
about not using them.  Bah.  This should (hopefully) end this.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 kernel/module.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/module.c~modules-add-version-and-srcversion-to-sysfs-fix-3 kernel/module.c
--- 25/kernel/module.c~modules-add-version-and-srcversion-to-sysfs-fix-3	Thu Jun  9 15:27:59 2005
+++ 25-akpm/kernel/module.c	Thu Jun  9 15:27:59 2005
@@ -370,6 +370,7 @@ static inline void percpu_modcopy(void *
 }
 #endif /* CONFIG_SMP */
 
+#ifdef CONFIG_MODULE_UNLOAD
 #define MODINFO_ATTR(field)	\
 static void setup_modinfo_##field(struct module *mod, const char *s)  \
 {                                                                     \
@@ -407,7 +408,6 @@ static struct module_attribute *modinfo_
 	NULL,
 };
 
-#ifdef CONFIG_MODULE_UNLOAD
 /* Init the unload section of the module. */
 static void module_unload_init(struct module *mod)
 {
_