Re: [BUG] sparse warning EXPORT_SYMBOL()'d symbol non-static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux