public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] acct: fix build warning when ACCT_VERSION != 3
Date: Thu, 2 Oct 2014 00:06:53 +0100	[thread overview]
Message-ID: <20141001230653.GA25541@hercules> (raw)

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

             reply	other threads:[~2014-10-01 23:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 23:06 Luis Henriques [this message]
2014-10-02 21:09 ` [PATCH] acct: fix build warning when ACCT_VERSION != 3 Andrew Morton
2014-10-02 21:55   ` Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141001230653.GA25541@hercules \
    --to=luis.henriques@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox