lkml.org 
[lkml]   [2011]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] module: do not hide __modver_version_show declaration behind ifdef
    Date
    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>
    ---
    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 9b7081a..cb41837 100644
    --- a/include/linux/module.h
    +++ b/include/linux/module.h
    @@ -64,6 +64,9 @@ struct module_version_attribute {
    const char *version;
    };

    +extern ssize_t __modver_version_show(struct module_attribute *,
    + struct module *, char *);
    +
    struct module_kobject
    {
    struct kobject kobj;
    @@ -172,8 +175,6 @@ extern struct module __this_module;
    #define MODULE_VERSION(_version) MODULE_INFO(version, _version)
    #else
    #define MODULE_VERSION(_version) \
    - extern ssize_t __modver_version_show(struct module_attribute *, \
    - struct module *, char *); \
    static struct module_version_attribute ___modver_attr = { \
    .mattr = { \
    .attr = { \
    --
    1.7.3.2


    \
     
     \ /
      Last update: 2011-02-08 01:05    [W:6.789 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site