linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] audit: Make audit_log_cap and audit_copy_inode static
@ 2019-03-20 13:59 Yue Haibing
  2019-03-20 15:27 ` Richard Guy Briggs
  2019-03-21  1:05 ` Paul Moore
  0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2019-03-20 13:59 UTC (permalink / raw)
  To: paul, eparis; +Cc: linux-kernel, linux-audit, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

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>
---
 kernel/auditsc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index fa7b804..17b0007 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -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;
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] audit: Make audit_log_cap and audit_copy_inode static
  2019-03-20 13:59 [PATCH -next] audit: Make audit_log_cap and audit_copy_inode static Yue Haibing
@ 2019-03-20 15:27 ` Richard Guy Briggs
  2019-03-21  1:05 ` Paul Moore
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Guy Briggs @ 2019-03-20 15:27 UTC (permalink / raw)
  To: Yue Haibing; +Cc: paul, eparis, linux-audit, linux-kernel

On 2019-03-20 21:59, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> 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>

Thanks for the patch.

Acked-by: Richard Guy Briggs <rgb@redhat.com>

> ---
>  kernel/auditsc.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index fa7b804..17b0007 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -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;
> -- 
> 2.7.0
> 
> 
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit

- RGB

--
Richard Guy Briggs <rgb@redhat.com>
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] audit: Make audit_log_cap and audit_copy_inode static
  2019-03-20 13:59 [PATCH -next] audit: Make audit_log_cap and audit_copy_inode static Yue Haibing
  2019-03-20 15:27 ` Richard Guy Briggs
@ 2019-03-21  1:05 ` Paul Moore
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2019-03-21  1:05 UTC (permalink / raw)
  To: Yue Haibing; +Cc: Eric Paris, linux-kernel, linux-audit

On Wed, Mar 20, 2019 at 9:59 AM Yue Haibing <yuehaibing@huawei.com> wrote:
>
> From: YueHaibing <yuehaibing@huawei.com>
>
> 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>
> ---
>  kernel/auditsc.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Merged into audit/next, thanks.

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-21  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 13:59 [PATCH -next] audit: Make audit_log_cap and audit_copy_inode static Yue Haibing
2019-03-20 15:27 ` Richard Guy Briggs
2019-03-21  1:05 ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).