public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dobson <colpatch@us.ibm.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>,
	"Bligh, Martin J." <Martin.Bligh@us.ibm.com>
Subject: Fix warning in kernel/module.c
Date: Thu, 09 Jun 2005 11:03:42 -0700	[thread overview]
Message-ID: <42A8847E.4020302@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

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.

-Matt

[-- Attachment #2: modinfo_attrs-fix2.patch --]
[-- Type: text/x-patch, Size: 662 bytes --]

--- linux-2.6.12-rc6-mm1/kernel/module.c	2005-06-08 15:22:43.995409432 -0700
+++ linux-2.6.12-rc6-mm1/kernel/module.c.fixed	2005-06-08 15:21:55.286814264 -0700
@@ -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)
 {

                 reply	other threads:[~2005-06-09 18:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42A8847E.4020302@us.ibm.com \
    --to=colpatch@us.ibm.com \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox