Skip to contentSkip to conversation

Smack: Three symbols that should be static

PATCH New Casey Schaufler 1 participant 1 message Jul 30, 2015

Subsystems (2)
lore
Share & tools
lore

Casey Schaufler

author maintainer
#0 lore raw

PATCH 1/1 Smack: Three symbols that should be static

Subject: [PATCH] Smack: Three symbols that should be static

The kbuild test robot reported a couple of these, and the third showed up by inspection. Making the symbols static is proper.

---
 security/smack/smack_lsm.c | 4 ++--
 security/smack/smackfs.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
security/smack/smack_lsm.c +2 -2
index cc390bc..54fb3a1 100644
@@ -291,7 +291,7 @@ static struct smack_known *smk_fetch(const char *name, struct inode *ip,
  *
  * Returns the new blob or NULL if there's no memory available
  */
-struct inode_smack *new_inode_smack(struct smack_known *skp)
+static struct inode_smack *new_inode_smack(struct smack_known *skp)
 {
 	struct inode_smack *isp;
 
@@ -4516,7 +4516,7 @@ static int smack_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
 	return 0;
 }
 
-struct security_hook_list smack_hooks[] = {
+static struct security_hook_list smack_hooks[] = {
 	LSM_HOOK_INIT(ptrace_access_check, smack_ptrace_access_check),
 	LSM_HOOK_INIT(ptrace_traceme, smack_ptrace_traceme),
 	LSM_HOOK_INIT(syslog, smack_syslog),
security/smack/smackfs.c +1 -1
index 11b752b..c20b154 100644
@@ -139,7 +139,7 @@ struct smack_master_list {
 	struct smack_rule	*smk_rule;
 };
 
-LIST_HEAD(smack_rule_list);
+static LIST_HEAD(smack_rule_list);
 
 struct smack_parsed_rule {
 	struct smack_known	*smk_subject;