]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set
authorDust Li <dust.li@linux.alibaba.com>
Wed, 9 Mar 2022 03:30:51 +0000 (11:30 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Mar 2022 04:02:35 +0000 (20:02 -0800)
commit4dd49281041fd62fcc23563fe7bb972fdd6d0acc
tree10af52488d34ba5b73389b0ded4651d4d679f257
parentc7beac6ac6c82e13028ac9d64a60bb094d96e528
net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set

when CONFIG_SYSCTL not set, smc_sysctl_net_init/exit
need to be static inline to avoid missing-prototypes
if compile with W=1.

Since __net_exit has noinline annotation when CONFIG_NET_NS
not set, it should not be used with static inline.
So remove the __net_init/exit when CONFIG_SYSCTL not set.

Fixes: f0262b7e6fba ("net/smc: fix compile warning for smc_sysctl")
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220309033051.41893-1-dust.li@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/smc_sysctl.h