linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sysctl: set variable sysctl_mount_point storage-class-specifier to static
@ 2023-06-11 12:07 Tom Rix
  2023-06-13 20:30 ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2023-06-11 12:07 UTC (permalink / raw)
  To: mcgrof, keescook, yzaikin; +Cc: linux-kernel, linux-fsdevel, 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 <trix@redhat.com>
---
 fs/proc/proc_sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 2715e6114933..67872cbc0517 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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 }
 };
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sysctl: set variable sysctl_mount_point storage-class-specifier to static
  2023-06-11 12:07 [PATCH] sysctl: set variable sysctl_mount_point storage-class-specifier to static Tom Rix
@ 2023-06-13 20:30 ` Kees Cook
  2023-06-30 23:20   ` Luis Chamberlain
  0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2023-06-13 20:30 UTC (permalink / raw)
  To: Tom Rix; +Cc: mcgrof, yzaikin, linux-kernel, linux-fsdevel

On Sun, Jun 11, 2023 at 08:07:25AM -0400, Tom Rix wrote:
> 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>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sysctl: set variable sysctl_mount_point storage-class-specifier to static
  2023-06-13 20:30 ` Kees Cook
@ 2023-06-30 23:20   ` Luis Chamberlain
  0 siblings, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2023-06-30 23:20 UTC (permalink / raw)
  To: Kees Cook; +Cc: Tom Rix, yzaikin, linux-kernel, linux-fsdevel

On Tue, Jun 13, 2023 at 01:30:47PM -0700, Kees Cook wrote:
> On Sun, Jun 11, 2023 at 08:07:25AM -0400, Tom Rix wrote:
> > 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>

Queued up, thanks!

  Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-30 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-11 12:07 [PATCH] sysctl: set variable sysctl_mount_point storage-class-specifier to static Tom Rix
2023-06-13 20:30 ` Kees Cook
2023-06-30 23:20   ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).