From: miles@lsi.nec.co.jp (Miles Bader)
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Quiet warnings for def of {_,}_MOD_INC_USE_COUNT when CONFIG_MODULE=n
Date: Tue, 7 Jan 2003 15:32:39 +0900 (JST) [thread overview]
Message-ID: <20030107063239.27428374A@mcspd15.ucom.lsi.nec.co.jp> (raw)
Since `try_module_get(module)' is really just `1' when modules are
disabled, the compiler bitches. As these definitions are inlines in a
header file, this results in a warning for every file that includes
modules.h.
diff -ruN -X../cludes linux-2.5.54-moo.orig/include/linux/module.h linux-2.5.54-moo/include/linux/module.h
--- linux-2.5.54-moo.orig/include/linux/module.h 2003-01-06 10:51:19.000000000 +0900
+++ linux-2.5.54-moo/include/linux/module.h 2003-01-06 16:30:28.000000000 +0900
@@ -314,7 +314,7 @@
/*
* Yes, we ignore the retval here, that's why it's deprecated.
*/
- try_module_get(module);
+ (void)try_module_get(module);
}
static inline void __deprecated __MOD_DEC_USE_COUNT(struct module *module)
@@ -350,7 +350,7 @@
local_inc(&module->ref[get_cpu()].count);
put_cpu();
#else
- try_module_get(module);
+ (void)try_module_get(module);
#endif
}
#define MOD_INC_USE_COUNT \
next reply other threads:[~2003-01-07 6:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-07 6:32 Miles Bader [this message]
2003-01-07 7:34 ` Muli Ben-Yehuda
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=20030107063239.27428374A@mcspd15.ucom.lsi.nec.co.jp \
--to=miles@lsi.nec.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=miles@gnu.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®