public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jeff Layton <jeff.layton@primarydata.com>
Cc: Mark Salter <msalter@redhat.com>,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH] sunrpc: eliminate RPC_DEBUG
Date: Mon, 06 Apr 2015 16:38:09 +0200	[thread overview]
Message-ID: <4110847.o7VvYRDU5Z@wuerfel> (raw)
In-Reply-To: <20150406100452.402754a6@tlielax.poochiereds.net>

On Monday 06 April 2015 10:04:52 Jeff Layton wrote:
> > diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
> > index 665ef5a..a563ddb 100644
> > --- a/fs/lockd/svcsubs.c
> > +++ b/fs/lockd/svcsubs.c
> > @@ -31,7 +31,7 @@
> >  static struct hlist_head     nlm_files[FILE_NRHASH];
> >  static DEFINE_MUTEX(nlm_file_mutex);
> >  
> > -#ifdef NFSD_DEBUG
> > +#ifdef CONFIG_SUNRPC_DEBUG
> 
> Technically, you should use #if IS_ENABLED(CONFIG_SUNRPC_DEBUG). That's
> supposed to help the compiler do checking of the code inside the block
> even when it's not defined.

You probably meant the right thing and wrote something else: you should use
'if (IS_ENABLED(CONFIG_SUNRPC_DEBUG)) { ... }' to get that effect, but that
only works within a function. '#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)' is just
a nicer way to write '#if defined(CONFIG_SUNRPC_DEBUG) || 
defined(CONFIG_SUNRPC_DEBUG_MODULE)', which is harmless but pointless here
as the symbol would never be set to 'm'.

	Arnd

  parent reply	other threads:[~2015-04-06 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 13:46 [PATCH] sunrpc: eliminate RPC_DEBUG Mark Salter
2015-04-06 14:04 ` Jeff Layton
2015-04-06 14:13   ` Mark Salter
2015-04-06 14:38   ` Arnd Bergmann [this message]
2015-04-06 14:45     ` Jeff Layton
2015-04-06 18:18       ` J. Bruce Fields

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=4110847.o7VvYRDU5Z@wuerfel \
    --to=arnd@arndb.de \
    --cc=anna.schumaker@netapp.com \
    --cc=jeff.layton@primarydata.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=msalter@redhat.com \
    --cc=trond.myklebust@primarydata.com \
    /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