Skip to content

Commit

Permalink
audit: Make audit_log_cap and audit_copy_inode static
Browse files Browse the repository at this point in the history
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?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
YueHaibing authored and pcmoore committed Mar 21, 2019
1 parent 73e65b8 commit 2efa48f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2efa48f

Please sign in to comment.