* [PATCH net-next] net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set
@ 2022-03-09 3:30 Dust Li
2022-03-10 4:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dust Li @ 2022-03-09 3:30 UTC (permalink / raw)
To: kuba, Karsten Graul, Tony Lu, davem; +Cc: netdev, linux-s390, linux-rdma
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: 7de8eb0d9039 ("net/smc: fix compile warning for smc_sysctl")
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
---
net/smc/smc_sysctl.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/smc/smc_sysctl.h b/net/smc/smc_sysctl.h
index 1d554300604d..0becc11bd2f4 100644
--- a/net/smc/smc_sysctl.h
+++ b/net/smc/smc_sysctl.h
@@ -20,13 +20,13 @@ void __net_exit smc_sysctl_net_exit(struct net *net);
#else
-int __net_init smc_sysctl_net_init(struct net *net)
+static inline int smc_sysctl_net_init(struct net *net)
{
net->smc.sysctl_autocorking_size = SMC_AUTOCORKING_DEFAULT_SIZE;
return 0;
}
-void __net_exit smc_sysctl_net_exit(struct net *net) { }
+static inline void smc_sysctl_net_exit(struct net *net) { }
#endif /* CONFIG_SYSCTL */
--
2.19.1.3.ge56e4f7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set
2022-03-09 3:30 [PATCH net-next] net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set Dust Li
@ 2022-03-10 4:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-10 4:20 UTC (permalink / raw)
To: Dust Li; +Cc: kuba, kgraul, tonylu, davem, netdev, linux-s390, linux-rdma
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 9 Mar 2022 11:30:51 +0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net-next] net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set
https://git.kernel.org/netdev/net-next/c/d9f509915925
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-10 4:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 3:30 [PATCH net-next] net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set Dust Li
2022-03-10 4:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox