All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acct: fix build warning when ACCT_VERSION != 3
@ 2014-10-01 23:06 Luis Henriques
  2014-10-02 21:09 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Luis Henriques @ 2014-10-01 23:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Al Viro, Andrew Morton

struct pid_namespace *ns is used only when ACCT_VERSION is 3.

kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 kernel/acct.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/acct.c b/kernel/acct.c
index b4c667d22e79..5f277f5c5e29 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)
 	acct_t ac;
 	unsigned long flim;
 	const struct cred *orig_cred;
+#if ACCT_VERSION == 3
 	struct pid_namespace *ns = acct->ns;
+#endif
 	struct file *file = acct->file;
 
 	/*
-- 
2.1.0

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

* Re: [PATCH] acct: fix build warning when ACCT_VERSION != 3
  2014-10-01 23:06 [PATCH] acct: fix build warning when ACCT_VERSION != 3 Luis Henriques
@ 2014-10-02 21:09 ` Andrew Morton
  2014-10-02 21:55   ` Luis Henriques
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2014-10-02 21:09 UTC (permalink / raw)
  To: Luis Henriques; +Cc: linux-kernel, Al Viro

On Thu, 2 Oct 2014 00:06:53 +0100 Luis Henriques <luis.henriques@canonical.com> wrote:

> struct pid_namespace *ns is used only when ACCT_VERSION is 3.
> 
> kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]
> 
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
>  kernel/acct.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/acct.c b/kernel/acct.c
> index b4c667d22e79..5f277f5c5e29 100644
> --- a/kernel/acct.c
> +++ b/kernel/acct.c
> @@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)
>  	acct_t ac;
>  	unsigned long flim;
>  	const struct cred *orig_cred;
> +#if ACCT_VERSION == 3
>  	struct pid_namespace *ns = acct->ns;
> +#endif
>  	struct file *file = acct->file;
>  
>  	/*

It's always a good idea to check linux-next.  This has been addressed by
http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning.patch
http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning-fix.patch



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

* Re: [PATCH] acct: fix build warning when ACCT_VERSION != 3
  2014-10-02 21:09 ` Andrew Morton
@ 2014-10-02 21:55   ` Luis Henriques
  0 siblings, 0 replies; 3+ messages in thread
From: Luis Henriques @ 2014-10-02 21:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Al Viro

On Thu, Oct 02, 2014 at 02:09:45PM -0700, Andrew Morton wrote:
> On Thu, 2 Oct 2014 00:06:53 +0100 Luis Henriques <luis.henriques@canonical.com> wrote:
> 
> > struct pid_namespace *ns is used only when ACCT_VERSION is 3.
> > 
> > kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]
> > 
> > Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> > ---
> >  kernel/acct.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/kernel/acct.c b/kernel/acct.c
> > index b4c667d22e79..5f277f5c5e29 100644
> > --- a/kernel/acct.c
> > +++ b/kernel/acct.c
> > @@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)
> >  	acct_t ac;
> >  	unsigned long flim;
> >  	const struct cred *orig_cred;
> > +#if ACCT_VERSION == 3
> >  	struct pid_namespace *ns = acct->ns;
> > +#endif
> >  	struct file *file = acct->file;
> >  
> >  	/*
> 
> It's always a good idea to check linux-next.  This has been addressed by
> http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning.patch
> http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning-fix.patch
> 
> 

Ah, awesome!  I missed these patches.  Thanks Andrew.

Cheers,
--
Luís

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

end of thread, other threads:[~2014-10-02 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 23:06 [PATCH] acct: fix build warning when ACCT_VERSION != 3 Luis Henriques
2014-10-02 21:09 ` Andrew Morton
2014-10-02 21:55   ` Luis Henriques

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.