Commit c55eb037 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Jakub Kicinski

net/ipv6/addrconf: constify ctl_table arguments of utility functions

The sysctl core is preparing to only expose instances of
struct ctl_table as "const".
This will also affect the ctl_table argument of sysctl handlers.

As the function prototype of all sysctl handlers throughout the tree
needs to stay consistent that change will be done in one commit.

To reduce the size of that final commit, switch utility functions which
are not bound by "typedef proc_handler" to "const struct ctl_table".

No functional change.
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-3-16523767d0b2@weissschuh.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 55181431
...@@ -863,7 +863,7 @@ static void addrconf_forward_change(struct net *net, __s32 newf) ...@@ -863,7 +863,7 @@ static void addrconf_forward_change(struct net *net, __s32 newf)
} }
} }
static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int newf) static int addrconf_fixup_forwarding(const struct ctl_table *table, int *p, int newf)
{ {
struct net *net; struct net *net;
int old; int old;
...@@ -931,7 +931,7 @@ static void addrconf_linkdown_change(struct net *net, __s32 newf) ...@@ -931,7 +931,7 @@ static void addrconf_linkdown_change(struct net *net, __s32 newf)
} }
} }
static int addrconf_fixup_linkdown(struct ctl_table *table, int *p, int newf) static int addrconf_fixup_linkdown(const struct ctl_table *table, int *p, int newf)
{ {
struct net *net; struct net *net;
int old; int old;
...@@ -6378,7 +6378,7 @@ static void addrconf_disable_change(struct net *net, __s32 newf) ...@@ -6378,7 +6378,7 @@ static void addrconf_disable_change(struct net *net, __s32 newf)
} }
} }
static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf) static int addrconf_disable_ipv6(const struct ctl_table *table, int *p, int newf)
{ {
struct net *net = (struct net *)table->extra2; struct net *net = (struct net *)table->extra2;
int old; int old;
...@@ -6669,7 +6669,7 @@ void addrconf_disable_policy_idev(struct inet6_dev *idev, int val) ...@@ -6669,7 +6669,7 @@ void addrconf_disable_policy_idev(struct inet6_dev *idev, int val)
} }
static static
int addrconf_disable_policy(struct ctl_table *ctl, int *valp, int val) int addrconf_disable_policy(const struct ctl_table *ctl, int *valp, int val)
{ {
struct net *net = (struct net *)ctl->extra2; struct net *net = (struct net *)ctl->extra2;
struct inet6_dev *idev; struct inet6_dev *idev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment