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

net/ipv4/sysctl: 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-2-16523767d0b2@weissschuh.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 874aa96d
...@@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, int write, ...@@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, int write,
return ret; return ret;
} }
static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low, kgid_t *high) static void inet_get_ping_group_range_table(const struct ctl_table *table,
kgid_t *low, kgid_t *high)
{ {
kgid_t *data = table->data; kgid_t *data = table->data;
struct net *net = struct net *net =
...@@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low ...@@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low
} }
/* Update system visible IP port range */ /* Update system visible IP port range */
static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t high) static void set_ping_group_range(const struct ctl_table *table,
kgid_t low, kgid_t high)
{ {
kgid_t *data = table->data; kgid_t *data = table->data;
struct net *net = struct net *net =
......
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