net: make symbol 'flush_works' static
Subsystems (2)
PATCH 1/1 net: make symbol 'flush_works' static
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 <[email protected]>
Signed-off-by Wei Yongjun <[email protected]>
--- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/dev.c +1 -1
@@ -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)
David Miller
maintainerFrom: Wei Yongjun <[email protected]>
Date: Fri, 10 Jul 2020 15:31:04 +0800
Quoted 10 lines
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 ofdev.c, so marks it static.Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Please provide an appropriate Fixes: tag for these kinds of changes.
Thank you.