]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: sched: wrap tc_skip_wrapper with CONFIG_RETPOLINE
authorMin-Hua Chen <minhuadotchen@gmail.com>
Fri, 2 Jun 2023 23:52:09 +0000 (07:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:14:22 +0000 (11:14 +0200)
[ Upstream commit 8cde87b007dad2e461015ff70352af56ceb02c75 ]

This patch fixes the following sparse warning:

net/sched/sch_api.c:2305:1: sparse: warning: symbol 'tc_skip_wrapper' was not declared. Should it be static?

No functional change intended.

Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Acked-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_api.c

index 3f7311529cc00af4f5065ed113a26fdc60d0baa5..34c90c9c2fcad47dfa0634f25e23275d256b3abb 100644 (file)
@@ -2324,7 +2324,9 @@ static struct pernet_operations psched_net_ops = {
        .exit = psched_net_exit,
 };
 
+#if IS_ENABLED(CONFIG_RETPOLINE)
 DEFINE_STATIC_KEY_FALSE(tc_skip_wrapper);
+#endif
 
 static int __init pktsched_init(void)
 {