mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
[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>
This commit is contained in:
parent
c4dd0e4c63
commit
52303e8b5f
1 changed files with 3 additions and 1 deletions
|
@ -554,7 +554,9 @@ static inline void MODULE_PARM_(void) { }
|
|||
#ifdef MODULE
|
||||
/* DEPRECATED: Do not use. */
|
||||
#define MODULE_PARM(var,type) \
|
||||
struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
|
||||
extern struct obsolete_modparm __parm_##var \
|
||||
__attribute__((section("__obsparm"))); \
|
||||
struct obsolete_modparm __parm_##var = \
|
||||
{ __stringify(var), type, &MODULE_PARM_ }; \
|
||||
__MODULE_PARM_TYPE(var, type);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue