kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [nfsd:for-3.6 18/29] fs/lockd/host.c:603:21: warning: unused variable 'ln'
Date: Wed, 01 Aug 2012 00:33:23 +0000	[thread overview]
Message-ID: <20120801003323.GA7442@localhost> (raw)
In-Reply-To: <20120730230955.GB5838@localhost>

On Mon, Jul 30, 2012 at 07:33:54PM -0400, J. Bruce Fields wrote:
> On Tue, Jul 31, 2012 at 07:09:55AM +0800, Fengguang Wu wrote:
> > Hi Stanislav,
> > 
> > There are new compile warnings show up in
> > 
> > tree:   git://git.linux-nfs.org/~bfields/linux.git for-3.6
> > head:   2c142baa7b237584bae7dc28630851701497e1ef
> > commit: caa4e76b6f284bab535a98fd37b9c46856158bcb [18/29] LockD: manage used host count per networks namespace
> > config: x86_64-randconfig-s012 (attached as .config)
> > 
> > All error/warnings:
> > 
> > fs/lockd/host.c: In function 'nlm_shutdown_hosts_net':
> > fs/lockd/host.c:603:21: warning: unused variable 'ln' [-Wunused-variable]
> > 
> > vim +603 fs/lockd/host.c
> >    600	
> >    601		/* complain if any hosts are left */
> >    602		if (net) {
> >  > 603			struct lockd_net *ln = net_generic(net, lockd_net_id);
> >    604	
> >    605			printk(KERN_WARNING "lockd: couldn't shutdown host module for net %p!\n", net);
> >    606			dprintk("lockd: %lu hosts left in net %p:\n", ln->nrhosts, net);
> 
> Probably ln is unused in the !RPC_DEBUG case.  Do we care?
> 
> The declaration could also go under #ifdef RPC_DEBUG, but that's ugly.
> 
> Is there some way to tell gcc to just ignore this?

Bruce, we may follow this example:

mm/memcontrol.c:                bool do_numainfo __maybe_unused;

Thanks,
Fengguang

      parent reply	other threads:[~2012-08-01  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 23:09 [nfsd:for-3.6 18/29] fs/lockd/host.c:603:21: warning: unused variable 'ln' Fengguang Wu
2012-07-30 23:33 ` J. Bruce Fields
2012-08-01  0:33 ` Fengguang Wu [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=20120801003323.GA7442@localhost \
    --to=fengguang.wu@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).