[PATCH] net: sysctl: remove redundant #ifdef CONFIG_NET

Subsystems: networking [general], the rest

STALE2025d LANDED

Landed in mainline as 69783429cd13 on 2021-01-28.

2 messages, 2 authors, 2021-01-28 · open the first message on its own page

[PATCH] net: sysctl: remove redundant #ifdef CONFIG_NET

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2021-01-25 23:17:53

CONFIG_NET is a bool option, and this file is compiled only when
CONFIG_NET=y.

Remove #ifdef CONFIG_NET, which we know it is always met.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 net/core/sysctl_net_core.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index d86d8d11cfe4..4567de519603 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -309,7 +309,6 @@ proc_dolongvec_minmax_bpf_restricted(struct ctl_table *table, int write,
 #endif
 
 static struct ctl_table net_core_table[] = {
-#ifdef CONFIG_NET
 	{
 		.procname	= "wmem_max",
 		.data		= &sysctl_wmem_max,
@@ -507,7 +506,6 @@ static struct ctl_table net_core_table[] = {
 		.proc_handler	= set_default_qdisc
 	},
 #endif
-#endif /* CONFIG_NET */
 	{
 		.procname	= "netdev_budget",
 		.data		= &netdev_budget,
-- 
2.27.0

Re: [PATCH] net: sysctl: remove redundant #ifdef CONFIG_NET

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-01-28 01:15:17

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Tue, 26 Jan 2021 08:14:21 +0900 you wrote:
CONFIG_NET is a bool option, and this file is compiled only when
CONFIG_NET=y.

Remove #ifdef CONFIG_NET, which we know it is always met.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

[...]
Here is the summary with links:
  - net: sysctl: remove redundant #ifdef CONFIG_NET
    https://git.kernel.org/netdev/net-next/c/69783429cd13

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help