Commit 9b73a584 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Rusty Russell

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: default avatarDmitry Torokhov <dtor@vmware.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent b4bc8428
...@@ -64,6 +64,9 @@ struct module_version_attribute { ...@@ -64,6 +64,9 @@ struct module_version_attribute {
const char *version; const char *version;
} __attribute__ ((__aligned__(sizeof(void *)))); } __attribute__ ((__aligned__(sizeof(void *))));
extern ssize_t __modver_version_show(struct module_attribute *,
struct module *, char *);
struct module_kobject struct module_kobject
{ {
struct kobject kobj; struct kobject kobj;
...@@ -172,8 +175,6 @@ extern struct module __this_module; ...@@ -172,8 +175,6 @@ extern struct module __this_module;
#define MODULE_VERSION(_version) MODULE_INFO(version, _version) #define MODULE_VERSION(_version) MODULE_INFO(version, _version)
#else #else
#define MODULE_VERSION(_version) \ #define MODULE_VERSION(_version) \
extern ssize_t __modver_version_show(struct module_attribute *, \
struct module *, char *); \
static struct module_version_attribute ___modver_attr = { \ static struct module_version_attribute ___modver_attr = { \
.mattr = { \ .mattr = { \
.attr = { \ .attr = { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment