net: make xps_needed and xps_rxqs_needed static
Subsystems (2)
PATCH 1/1 net: make xps_needed and xps_rxqs_needed static
From: Vladimir Oltean <[email protected]>
Since their introduction in commit 04157469b7b8 ("net: Use static_key for XPS maps"), xps_needed and xps_rxqs_needed were never used outside net/core/dev.c, so I don't really understand why they were exported as symbols in the first place.
This is needed in order to silence a "make W=1" warning about these static keys not being declared as static variables, but not having a previous declaration in a header file nonetheless.
--- net/core/dev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
net/core/dev.c +2 -4
@@ -2451,10 +2451,8 @@ int netdev_txq_to_tc(struct net_device *dev, unsigned int txq)EXPORT_SYMBOL (netdev_txq_to_tc);#ifdef CONFIG_XPS -struct static_key xps_needed__read_mostly ; -EXPORT_SYMBOL (xps_needed); -struct static_key xps_rxqs_needed__read_mostly ; -EXPORT_SYMBOL (xps_rxqs_needed); +static struct static_key xps_needed__read_mostly ; +static struct static_key xps_rxqs_needed__read_mostly ;static DEFINE_MUTEX (xps_map_mutex);#define xmap_dereference (P ) \ rcu_dereference_protected((P), lockdep_is_held(&xps_map_mutex))
Signature · 1 line
2.25.1
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Mon, 22 Mar 2021 13:30:19 +0200 you wrote:
From: Vladimir Oltean <[email protected]>
Since their introduction in commit
04157469b7b8("net: Usestatic_keyfor XPS maps"),xps_neededandxps_rxqs_neededwere never used outsidenet/core/dev.c, so I don't really understand why they were exported as symbols in the first place.[...]
Here is the summary with links:
- [net-next] net: make xps_needed and xps_rxqs_needed static
https://git.kernel.org/netdev/net-next/c/5da9ace3405f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html