public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  Quiet warnings for def of {_,}_MOD_INC_USE_COUNT when CONFIG_MODULE=n
@ 2003-01-07  6:32 Miles Bader
  2003-01-07  7:34 ` Muli Ben-Yehuda
  0 siblings, 1 reply; 2+ messages in thread
From: Miles Bader @ 2003-01-07  6:32 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel

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 \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]  Quiet warnings for def of {_,}_MOD_INC_USE_COUNT when CONFIG_MODULE=n
  2003-01-07  6:32 [PATCH] Quiet warnings for def of {_,}_MOD_INC_USE_COUNT when CONFIG_MODULE=n Miles Bader
@ 2003-01-07  7:34 ` Muli Ben-Yehuda
  0 siblings, 0 replies; 2+ messages in thread
From: Muli Ben-Yehuda @ 2003-01-07  7:34 UTC (permalink / raw)
  To: Miles Bader; +Cc: Rusty Russell, linux-kernel

On Tue, Jan 07, 2003 at 03:32:39PM +0900, Miles Bader wrote:
> 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.

Miles, 

You're the third or fourth person that sends a patch for this
buglet, including myself. There's a (slightly different) version in
Linus bitkeeper tree already, from Richard Henderson, 2003/01/02. 
-- 
Muli Ben-Yehuda

my opinions may seem crazy. But they all make sense. Insane sense, but
sense nontheless. -- Shlomi Fish on #offtopic.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-07  7:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-07  6:32 [PATCH] Quiet warnings for def of {_,}_MOD_INC_USE_COUNT when CONFIG_MODULE=n Miles Bader
2003-01-07  7:34 ` Muli Ben-Yehuda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox