sysctl: set variable sysctl_mount_point storage-class-specifier to static
Subsystems (3)
PATCH 1/1 sysctl: set variable sysctl_mount_point storage-class-specifier to static
smatch reportsfs/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 <[email protected]>
--- fs/proc/proc_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/proc_sysctl.c +1 -1
@@ -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[] = { {.flags =SYSCTL_PERM_EMPTY_DIR } };
Signature · 1 line
2.27.0
Quoted 7 lines · Tom Rix
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 <[email protected]>
Reviewed-by Kees Cook <[email protected]>
Signature · 1 line
Kees Cook
Luis Chamberlain
AppliedQuoted 10 lines · Kees Cook
Quoted 7 lines · Tom Rix
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 <[email protected]>Reviewed-by Kees Cook <[email protected]>
Queued up, thanks!
Luis