From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: josh@kernel.org, linux-sparse@vger.kernel.org
Cc: Wu Fengguang <fengguang.wu@intel.com>,
kbuild-all@01.org, Rusty Russell <rusty@rustcorp.com.au>,
Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>,
Wanlong Gao <gaowanlong@cn.fujitsu.com>
Subject: [BUG report]sparse warnings on DEFINE_PER_CPU() symbols non-static
Date: Tue, 26 Nov 2013 11:37:03 +0800 [thread overview]
Message-ID: <5294175F.2080407@cn.fujitsu.com> (raw)
Hi Folks,
If kernel config CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y, then the sparse will report non-static
warnings like following:
> /git/linux/fs/inode.c:74:8: warning: symbol 'nr_inodes' was not declared. Should it be static?
> /git/linux/fs/inode.c:75:8: warning: symbol 'nr_unused' was not declared. Should it be static?
>
> $ vi +74 fs/inode.c
> 73
> 74 static DEFINE_PER_CPU(unsigned long, nr_inodes);
> 75 static DEFINE_PER_CPU(unsigned long, nr_unused);
> 76
Any thoughts?
Thanks,
Wanlong Gao
next reply other threads:[~2013-11-26 3:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 3:37 Wanlong Gao [this message]
2013-12-03 22:25 ` [BUG report]sparse warnings on DEFINE_PER_CPU() symbols non-static Tejun Heo
2013-12-03 23:43 ` Josh Triplett
2013-12-04 15:10 ` Tejun Heo
2013-12-04 3:26 ` Wanlong Gao
2013-12-04 15:12 ` Tejun Heo
2013-12-05 0:18 ` Wanlong Gao
2013-12-05 18:01 ` [PATCH] percpu: fix spurious sparse warnings from DEFINE_PER_CPU() Tejun Heo
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=5294175F.2080407@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=cl@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=josh@kernel.org \
--cc=kbuild-all@01.org \
--cc=linux-sparse@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tj@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.