]> www.infradead.org Git - linux.git/commitdiff
utsname: constify ctl_table arguments of utility function
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 18 May 2024 13:53:40 +0000 (15:53 +0200)
committerJoel Granados <j.granados@samsung.com>
Mon, 3 Jun 2024 13:15:25 +0000 (15:15 +0200)
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: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Joel Granados <j.granados@samsung.com>
kernel/utsname_sysctl.c

index 76a772072557f3417abb7da6c2d5892b1405fccf..04e4513f2985e4d40baac5e92b6d93e221153a7c 100644 (file)
@@ -15,7 +15,7 @@
 
 #ifdef CONFIG_PROC_SYSCTL
 
-static void *get_uts(struct ctl_table *table)
+static void *get_uts(const struct ctl_table *table)
 {
        char *which = table->data;
        struct uts_namespace *uts_ns;