All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: toralf.foerster@gmx.de, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH] nfsd: fix unused "nn" variable warning in free_client()
Date: Wed, 9 Jan 2013 09:28:12 -0500	[thread overview]
Message-ID: <20130109142812.GC32710@fieldses.org> (raw)
In-Reply-To: <50ED3AB8.90006@parallels.com>

On Wed, Jan 09, 2013 at 01:39:04PM +0400, Stanislav Kinsbursky wrote:
> Bruce, sorry, forgot to add:
> 
> Reported-by: Toralf Förster <toralf.foerster@gmx.de>

Thanks, added that, and committing for 3.9.--b.

> 
> 09.01.2013 13:38, Stanislav Kinsbursky пишет:
> >If CONFIG_LOCKDEP is disabled, then there would be a warning like this:
> >
> >   CC [M]  fs/nfsd/nfs4state.o
> >fs/nfsd/nfs4state.c: In function ‘free_client’:
> >fs/nfsd/nfs4state.c:1051:19: warning: unused variable ‘nn’ [-Wunused-variable]
> >
> >So, let's add "maybe_unused" tag to this variable.
> >
> >Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
> >---
> >  fs/nfsd/nfs4state.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> >index 8f7362c..739a6c2 100644
> >--- a/fs/nfsd/nfs4state.c
> >+++ b/fs/nfsd/nfs4state.c
> >@@ -1048,7 +1048,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name)
> >  static inline void
> >  free_client(struct nfs4_client *clp)
> >  {
> >-	struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
> >+	struct nfsd_net __maybe_unused *nn = net_generic(clp->net, nfsd_net_id);
> >
> >  	lockdep_assert_held(&nn->client_lock);
> >  	while (!list_empty(&clp->cl_sessions)) {
> >
> 
> 
> -- 
> Best regards,
> Stanislav Kinsbursky

      reply	other threads:[~2013-01-09 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09  9:38 [PATCH] nfsd: fix unused "nn" variable warning in free_client() Stanislav Kinsbursky
2013-01-09  9:39 ` Stanislav Kinsbursky
2013-01-09 14:28   ` J. Bruce Fields [this message]

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=20130109142812.GC32710@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=skinsbursky@parallels.com \
    --cc=toralf.foerster@gmx.de \
    /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 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.