diff options
author | Dmitry Torokhov <dtor@vmware.com> | 2011-02-07 19:02:27 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-05-19 03:25:25 -0400 |
commit | 9b73a5840c7d5f77e5766626716df13787cb258c (patch) | |
tree | 5179b149129ee677d3a6fd621608cdc08206b516 /include/linux/module.h | |
parent | b4bc842802db3314f9a657094da0450a903ea619 (diff) |
module: do not hide __modver_version_show declaration behind ifdef
Doing so prevents the following warning from sparse:
CHECK kernel/params.c
kernel/params.c:817:9: warning: symbol '__modver_version_show' was not
declared. Should it be static?
since kernel/params.c is never compiled with MODULE being set.
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 4cfebc211695..23996ad147e7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -64,6 +64,9 @@ struct module_version_attribute { | |||
64 | const char *version; | 64 | const char *version; |
65 | } __attribute__ ((__aligned__(sizeof(void *)))); | 65 | } __attribute__ ((__aligned__(sizeof(void *)))); |
66 | 66 | ||
67 | extern ssize_t __modver_version_show(struct module_attribute *, | ||
68 | struct module *, char *); | ||
69 | |||
67 | struct module_kobject | 70 | struct module_kobject |
68 | { | 71 | { |
69 | struct kobject kobj; | 72 | struct kobject kobj; |
@@ -172,8 +175,6 @@ extern struct module __this_module; | |||
172 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 175 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
173 | #else | 176 | #else |
174 | #define MODULE_VERSION(_version) \ | 177 | #define MODULE_VERSION(_version) \ |
175 | extern ssize_t __modver_version_show(struct module_attribute *, \ | ||
176 | struct module *, char *); \ | ||
177 | static struct module_version_attribute ___modver_attr = { \ | 178 | static struct module_version_attribute ___modver_attr = { \ |
178 | .mattr = { \ | 179 | .mattr = { \ |
179 | .attr = { \ | 180 | .attr = { \ |