From: Johannes Berg <johannes@sipsolutions.net>
To: Wei Yongjun <weiyj.lk@gmail.com>, Andi Kleen <ak@linux.intel.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [BUG] sparse warning EXPORT_SYMBOL()'d symbol non-static
Date: Sun, 24 Nov 2013 20:49:41 +0100 [thread overview]
Message-ID: <1385322581.23961.5.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAPgLHd9hwKRQMr1dnzJon-nVkkgKxcL5M2jEY8AF6Sv8OZ+aOg@mail.gmail.com> (sfid-20131115_074628_306752_07E6E031)
On Fri, 2013-11-15 at 14:46 +0800, Wei Yongjun wrote:
> After the following kernel commit, sparse warning lot of
> EXPORT_SYMBOL()'d symbol non-static like this:
>
> CHECK net/sctp/socket.c
> net/sctp/socket.c:4292:1: warning:
> symbol '__ksymtab_sctp_do_peeloff' was not declared. Should it be static?
> Author: Andi Kleen <ak@linux.intel.com>
> Date: Wed Oct 23 10:57:58 2013 +1030
>
> asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible
>
> Make the ksymtab symbols for EXPORT_SYMBOL visible.
> This prevents the LTO compiler from adding a .NUMBER prefix,
> which avoids various problems in later export processing.
> Any idea?
Well, sparse is clearly "right", for all it cares it might very well be
static, but it seems this is necessary for something in the kernel and
we clearly can't forward-declare it in a header file. Perhaps we can add
some annotation to say
"__attribute__((yes_I_know_but_really_dont_want_this_to_be_static))" to
suppress this warning? This is getting annoying to me as well :-)
johannes
next prev parent reply other threads:[~2013-11-24 19:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 6:46 [BUG] sparse warning EXPORT_SYMBOL()'d symbol non-static Wei Yongjun
2013-11-24 19:49 ` Johannes Berg [this message]
2013-11-24 20:28 ` Andi Kleen
2013-11-24 20:36 ` Johannes Berg
2013-11-24 20:45 ` Josh Triplett
2013-11-24 20:48 ` Johannes Berg
2013-11-24 20:52 ` Johannes Berg
2013-11-24 22:34 ` Josh Triplett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385322581.23961.5.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=ak@linux.intel.com \
--cc=linux-sparse@vger.kernel.org \
--cc=weiyj.lk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).