netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: make symbol 'flush_works' static
@ 2020-07-13 14:23 Wei Yongjun
  2020-07-14  0:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-07-13 14:23 UTC (permalink / raw)
  To: Hulk Robot, Jakub Kicinski, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Jiri Pirko, Eric Dumazet,
	Taehee Yoo
  Cc: Wei Yongjun, netdev

The sparse tool complains as follows:

net/core/dev.c:5594:1: warning:
 symbol '__pcpu_scope_flush_works' was not declared. Should it be static?

'flush_works' is not used outside of dev.c, so marks
it static.

Fixes: 41852497a9205 ("net: batch calls to flush_all_backlogs()")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 - > v2: add fixes tag
---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index eab4ebe3c21c..b61075828358 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5591,7 +5591,7 @@ void netif_receive_skb_list(struct list_head *head)
 }
 EXPORT_SYMBOL(netif_receive_skb_list);
 
-DEFINE_PER_CPU(struct work_struct, flush_works);
+static DEFINE_PER_CPU(struct work_struct, flush_works);
 
 /* Network device is going away, flush any packets still pending */
 static void flush_backlog(struct work_struct *work)


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

* Re: [PATCH net-next v2] net: make symbol 'flush_works' static
  2020-07-13 14:23 [PATCH net-next v2] net: make symbol 'flush_works' static Wei Yongjun
@ 2020-07-14  0:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-14  0:25 UTC (permalink / raw)
  To: weiyongjun1
  Cc: hulkci, kuba, ast, daniel, hawk, john.fastabend, jiri, edumazet,
	ap420073, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Mon, 13 Jul 2020 22:23:44 +0800

> The sparse tool complains as follows:
> 
> net/core/dev.c:5594:1: warning:
>  symbol '__pcpu_scope_flush_works' was not declared. Should it be static?
> 
> 'flush_works' is not used outside of dev.c, so marks
> it static.
> 
> Fixes: 41852497a9205 ("net: batch calls to flush_all_backlogs()")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

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

end of thread, other threads:[~2020-07-14  0:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 14:23 [PATCH net-next v2] net: make symbol 'flush_works' static Wei Yongjun
2020-07-14  0:25 ` David Miller

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