Skip to contentSkip to conversation

audit: Make audit_log_cap and audit_copy_inode static

PATCH Applied Yue Haibing 3 participants 3 messages Mar 20, 2019 – Mar 21, 2019 Audit

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audit: Make audit_log_cap and audit_copy_inode static

From: YueHaibing <[email protected]>

Fix sparse warning:

kernel/auditsc.c:1150:6: warning: symbol 'audit_log_cap' was not declared. Should it be static? kernel/auditsc.c:1908:6: warning: symbol 'audit_copy_inode' was not declared. Should it be static?

---
 kernel/auditsc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
kernel/auditsc.c +5 -3
index fa7b804..17b0007 100644
@@ -1147,7 +1147,8 @@ static void audit_log_execve_info(struct audit_context *context,
 	kfree(buf_head);
 }
 
-void audit_log_cap(struct audit_buffer *ab, char *prefix, kernel_cap_t *cap)
+static void audit_log_cap(struct audit_buffer *ab, char *prefix,
+			  kernel_cap_t *cap)
 {
 	int i;
 
@@ -1905,8 +1906,9 @@ static inline int audit_copy_fcaps(struct audit_names *name,
 }
 
 /* Copy inode data into an audit_names. */
-void audit_copy_inode(struct audit_names *name, const struct dentry *dentry,
-		      struct inode *inode, unsigned int flags)
+static void audit_copy_inode(struct audit_names *name,
+			     const struct dentry *dentry,
+			     struct inode *inode, unsigned int flags)
 {
 	name->ino   = inode->i_ino;
 	name->dev   = inode->i_sb->s_dev;
Signature · 1 line
2.7.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Yue Haibing

From: YueHaibing <[email protected]>

Fix sparse warning:

kernel/auditsc.c:1150:6: warning: symbol 'audit_log_cap' was not declared. Should it be static? kernel/auditsc.c:1908:6: warning: symbol 'audit_copy_inode' was not declared. Should it be static?

Thanks for the patch.

Quoted 38 lines
---
 kernel/auditsc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
kernel/auditsc.c +5 -3
index fa7b804..17b0007 100644
@@ -1147,7 +1147,8 @@ static void audit_log_execve_info(struct audit_context *context,
 	kfree(buf_head);
 }
 
-void audit_log_cap(struct audit_buffer *ab, char *prefix, kernel_cap_t *cap)
+static void audit_log_cap(struct audit_buffer *ab, char *prefix,
+			  kernel_cap_t *cap)
 {
 	int i;
 
@@ -1905,8 +1906,9 @@ static inline int audit_copy_fcaps(struct audit_names *name,
 }
 
 /* Copy inode data into an audit_names. */
-void audit_copy_inode(struct audit_names *name, const struct dentry *dentry,
-		      struct inode *inode, unsigned int flags)
+static void audit_copy_inode(struct audit_names *name,
+			     const struct dentry *dentry,
+			     struct inode *inode, unsigned int flags)
 {
 	name->ino   = inode->i_ino;
 	name->dev   = inode->i_sb->s_dev;
Signature · 7 lines
2.7.0


--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit

- RGB

--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

maintainer Applied
#2 lore raw
In reply to Yue Haibing
Quoted 5 lines · Yue Haibing

From: YueHaibing <[email protected]>

Fix sparse warning:

Quoted 7 lines

kernel/auditsc.c:1150:6: warning: symbol 'audit_log_cap' was not declared. Should it be static? kernel/auditsc.c:1908:6: warning: symbol 'audit_copy_inode' was not declared. Should it be static?

---
 kernel/auditsc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Merged into audit/next, thanks.

Signature · 2 lines
paul moore
www.paul-moore.com