Skip to content

Commit

Permalink
sysctl: set variable key_sysctls storage-class-specifier to static
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tom Rix authored and Jarkko Sakkinen committed Aug 7, 2023
1 parent 0b15afc commit 0de030b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/keys/sysctl.c
Original file line number Diff line number Diff line change
@@ -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,

0 comments on commit 0de030b

Please sign in to comment.