Commit f39adb4c authored by Litao Jiao's avatar Litao Jiao
Browse files

net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set

mainline inclusion
from mainline-v5.18-rc1
commit d9f50991
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I76JHC
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/smc?id=d9f50991592513cc7633684cbaff65022cfa6816



--------------------------------

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: 7de8eb0d ("net/smc: fix compile warning for smc_sysctl")
Signed-off-by: default avatarDust Li <dust.li@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220309033051.41893-1-dust.li@linux.alibaba.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarLitao Jiao <jiaolitao@sangfor.com.cn>
parent 152866e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment