sysctl: make internal ctl_tables const
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 5 Aug 2024 09:39:39 +0000 (11:39 +0200)
committerJoel Granados <joel.granados@kernel.org>
Wed, 9 Oct 2024 11:39:11 +0000 (13:39 +0200)
Now that the sysctl core can handle registration of
"const struct ctl_table" constify the sysctl internal tables.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
fs/proc/proc_sysctl.c

index 968f8dc..9b9dfc4 100644 (file)
@@ -33,7 +33,7 @@ static const struct inode_operations proc_sys_dir_operations;
  * Support for permanently empty directories.
  * Must be non-empty to avoid sharing an address with other tables.
  */
-static struct ctl_table sysctl_mount_point[] = {
+static const struct ctl_table sysctl_mount_point[] = {
        { }
 };
 
@@ -67,7 +67,7 @@ void proc_sys_poll_notify(struct ctl_table_poll *poll)
        wake_up_interruptible(&poll->wait);
 }
 
-static struct ctl_table root_table[] = {
+static const struct ctl_table root_table[] = {
        {
                .procname = "",
                .mode = S_IFDIR|S_IRUGO|S_IXUGO,