Skip to contentSkip to conversation

sysctl: set variable key_sysctls storage-class-specifier to static

PATCH New Tom Rix 1 participant 1 message Jun 11, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 sysctl: set variable key_sysctls storage-class-specifier to static

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.

---
 security/keys/sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/keys/sysctl.c +1 -1
index b72b82bb20c6..b348e1679d5d 100644
@@ -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,
Signature · 1 line
2.27.0