linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG report]sparse warnings on DEFINE_PER_CPU() symbols non-static
@ 2013-11-26  3:37 Wanlong Gao
  2013-12-03 22:25 ` Tejun Heo
  0 siblings, 1 reply; 8+ messages in thread
From: Wanlong Gao @ 2013-11-26  3:37 UTC (permalink / raw)
  To: josh, linux-sparse
  Cc: Wu Fengguang, kbuild-all, Rusty Russell, Tejun Heo,
	Christoph Lameter, Wanlong Gao

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-05 18:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-26  3:37 [BUG report]sparse warnings on DEFINE_PER_CPU() symbols non-static Wanlong Gao
2013-12-03 22:25 ` 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

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).