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

ipvs: 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-5-16523767d0b2@weissschuh.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7a20cd1e
...@@ -1924,7 +1924,8 @@ proc_do_sync_ports(struct ctl_table *table, int write, ...@@ -1924,7 +1924,8 @@ proc_do_sync_ports(struct ctl_table *table, int write,
return rc; return rc;
} }
static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer) static int ipvs_proc_est_cpumask_set(const struct ctl_table *table,
void *buffer)
{ {
struct netns_ipvs *ipvs = table->extra2; struct netns_ipvs *ipvs = table->extra2;
cpumask_var_t *valp = table->data; cpumask_var_t *valp = table->data;
...@@ -1962,8 +1963,8 @@ static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer) ...@@ -1962,8 +1963,8 @@ static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer)
return ret; return ret;
} }
static int ipvs_proc_est_cpumask_get(struct ctl_table *table, void *buffer, static int ipvs_proc_est_cpumask_get(const struct ctl_table *table,
size_t size) void *buffer, size_t size)
{ {
struct netns_ipvs *ipvs = table->extra2; struct netns_ipvs *ipvs = table->extra2;
cpumask_var_t *valp = table->data; cpumask_var_t *valp = table->data;
......
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