]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
sysctl: set variable sysctl_mount_point storage-class-specifier to static
authorTom Rix <trix@redhat.com>
Fri, 30 Jun 2023 23:19:47 +0000 (16:19 -0700)
committerLuis Chamberlain <mcgrof@kernel.org>
Fri, 30 Jun 2023 23:19:47 +0000 (16:19 -0700)
smatch reports
fs/proc/proc_sysctl.c:32:18: warning: symbol
  'sysctl_mount_point' was not declared. Should it be static?

This variable is only used in its defining file, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
fs/proc/proc_sysctl.c

index 4e5488975415574ed921f8f0a92a6f1439e3a736..5ea42653126ebb40e7e8281a4acd76f01e690aab 100644 (file)
@@ -29,7 +29,7 @@ static const struct file_operations proc_sys_dir_file_operations;
 static const struct inode_operations proc_sys_dir_operations;
 
 /* Support for permanently empty directories */
-struct ctl_table sysctl_mount_point[] = {
+static struct ctl_table sysctl_mount_point[] = {
        {.type = SYSCTL_TABLE_TYPE_PERMANENTLY_EMPTY }
 };