linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 09/12] include/linux/module.h - compile warning cleanup
@ 2005-03-05 15:35 domen
  2005-03-07  0:46 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: domen @ 2005-03-05 15:35 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, domen, yrgrknmxpzlk


, extinguish warning for module structure that is still 
live when module is compiled into the kernel; do this in one central 
place so all such type warnings are automatically taken care of

Signed-off-by: Stephen Biggs <yrgrknmxpzlk@gawab.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/include/linux/module.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN include/linux/module.h~extinguish_warnings-include_linux_module.h include/linux/module.h
--- kj/include/linux/module.h~extinguish_warnings-include_linux_module.h	2005-03-05 16:12:03.000000000 +0100
+++ kj-domen/include/linux/module.h	2005-03-05 16:12:03.000000000 +0100
@@ -93,7 +93,10 @@ extern struct module __this_module;
 
 #else  /* !MODULE */
 
-#define MODULE_GENERIC_TABLE(gtype,name)
+#define MODULE_GENERIC_TABLE(gtype,name)			\
+extern const struct gtype##_id __not_mod_##name##_unused	\
+  __attribute__ ((unused, weak, alias(__stringify(name))))
+
 #define __MODULE_INFO(tag, name, info)
 #define THIS_MODULE ((struct module *)0)
 #endif
_

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

* Re: [patch 09/12] include/linux/module.h - compile warning cleanup
  2005-03-05 15:35 [patch 09/12] include/linux/module.h - compile warning cleanup domen
@ 2005-03-07  0:46 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2005-03-07  0:46 UTC (permalink / raw)
  To: domen; +Cc: linux-kernel, domen, yrgrknmxpzlk

domen@coderock.org wrote:
>
> , extinguish warning for module structure that is still 
> live when module is compiled into the kernel; do this in one central 
> place so all such type warnings are automatically taken care of
> 
> Signed-off-by: Stephen Biggs <yrgrknmxpzlk@gawab.com>
> Signed-off-by: Domen Puncer <domen@coderock.org>
> ---
> 
> 
>  kj-domen/include/linux/module.h |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff -puN include/linux/module.h~extinguish_warnings-include_linux_module.h include/linux/module.h
> --- kj/include/linux/module.h~extinguish_warnings-include_linux_module.h	2005-03-05 16:12:03.000000000 +0100
> +++ kj-domen/include/linux/module.h	2005-03-05 16:12:03.000000000 +0100
> @@ -93,7 +93,10 @@ extern struct module __this_module;
>  
>  #else  /* !MODULE */
>  
> -#define MODULE_GENERIC_TABLE(gtype,name)
> +#define MODULE_GENERIC_TABLE(gtype,name)			\
> +extern const struct gtype##_id __not_mod_##name##_unused	\
> +  __attribute__ ((unused, weak, alias(__stringify(name))))
> +

There's already a patch similar to this in Sam's bk-kbuild tree.

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

end of thread, other threads:[~2005-03-07  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-05 15:35 [patch 09/12] include/linux/module.h - compile warning cleanup domen
2005-03-07  0:46 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).