diff mbox series

[net-next] net: make symbol 'flush_works' static

Message ID 20200710073104.58784-1-weiyongjun1@huawei.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [net-next] net: make symbol 'flush_works' static | expand

Commit Message

Wei Yongjun July 10, 2020, 7:31 a.m. UTC
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.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller July 10, 2020, 9:16 p.m. UTC | #1
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Fri, 10 Jul 2020 15:31:04 +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.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Please provide an appropriate Fixes: tag for these kinds of changes.

Thank you.
diff mbox series

Patch

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)