sysctl: set variable key_sysctls storage-class-specifier to static
authorTom Rix <trix@redhat.com>
Sun, 11 Jun 2023 11:32:10 +0000 (07:32 -0400)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 7 Aug 2023 17:55:54 +0000 (17:55 +0000)
smatch reports
security/keys/sysctl.c:12:18: warning: symbol
  'key_sysctls' 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>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
security/keys/sysctl.c

index b72b82b..b348e16 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/sysctl.h>
 #include "internal.h"
 
-struct ctl_table key_sysctls[] = {
+static struct ctl_table key_sysctls[] = {
        {
                .procname = "maxkeys",
                .data = &key_quota_maxkeys,