diff options
author | Pavel Roskin <proski@gnu.org> | 2005-10-30 18:03:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:26 -0500 |
commit | 52303e8b5f8aa234865d40d76ea16b0ff4b27022 (patch) | |
tree | f109cfbc5cad79c691eca76ebcb8e4d078381368 /include/linux | |
parent | c4dd0e4c6336bd17fea38bcad636eafa2941cf9f (diff) |
[PATCH] modules: fix sparse warning for every MODULE_PARM
sparse complains about every MODULE_PARM used in a module: warning: symbol
'__parm_foo' was not declared. Should it be static?
The fix is to split declaration and initialization. While MODULE_PARM is
obsolete, it's not something sparse should report.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/module.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index f05372b7fe77..84d75f3a8aca 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -554,7 +554,9 @@ static inline void MODULE_PARM_(void) { } | |||
554 | #ifdef MODULE | 554 | #ifdef MODULE |
555 | /* DEPRECATED: Do not use. */ | 555 | /* DEPRECATED: Do not use. */ |
556 | #define MODULE_PARM(var,type) \ | 556 | #define MODULE_PARM(var,type) \ |
557 | struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \ | 557 | extern struct obsolete_modparm __parm_##var \ |
558 | __attribute__((section("__obsparm"))); \ | ||
559 | struct obsolete_modparm __parm_##var = \ | ||
558 | { __stringify(var), type, &MODULE_PARM_ }; \ | 560 | { __stringify(var), type, &MODULE_PARM_ }; \ |
559 | __MODULE_PARM_TYPE(var, type); | 561 | __MODULE_PARM_TYPE(var, type); |
560 | #else | 562 | #else |