summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-11 16:19:45 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-11 16:19:45 -0800
commitef3555bacb71d5f0fdf57d2afbca633122542a35 (patch)
treee641f54859552ee92d2e75c61000ca943cbee3cb /include/linux
parentb814dfb7fc292e86fc9bd2880c24f8cdff7ab048 (diff)
[PATCH] module.h __attribute_used__ fix
From: Rusty Russell <rusty@rustcorp.com.au> Someone added __attribute_used__ throughout module.h, but didn't remove the ", unused". Looks like some arch/gcc combos still consider it unused, and discard the fn.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/module.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 4c9b53d5d51c..25c325a0f07f 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -64,11 +64,12 @@ void sort_main_extable(void);
#define __MODULE_INFO(tag, name, info) \
static const char __module_cat(name,__LINE__)[] \
__attribute_used__ \
- __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
+ __attribute__((section(".modinfo"))) = __stringify(tag) "=" info
#define MODULE_GENERIC_TABLE(gtype,name) \
extern const struct gtype##_id __mod_##gtype##_table \
- __attribute__ ((unused, alias(__stringify(name))))
+ __attribute_used__ \
+ __attribute__ ((alias(__stringify(name))))
#define THIS_MODULE (&__this_module)
@@ -165,7 +166,7 @@ void *__symbol_get_gpl(const char *symbol);
extern void *__crc_##sym __attribute__((weak)); \
static const unsigned long __kcrctab_##sym \
__attribute_used__ \
- __attribute__((section("__kcrctab" sec), unused)) \
+ __attribute__((section("__kcrctab" sec))) \
= (unsigned long) &__crc_##sym;
#else
#define __CRC_SYMBOL(sym, sec)
@@ -179,7 +180,7 @@ void *__symbol_get_gpl(const char *symbol);
= MODULE_SYMBOL_PREFIX #sym; \
static const struct kernel_symbol __ksymtab_##sym \
__attribute_used__ \
- __attribute__((section("__ksymtab" sec), unused)) \
+ __attribute__((section("__ksymtab" sec))) \
= { (unsigned long)&sym, __kstrtab_##sym }
#define EXPORT_SYMBOL(sym) \