[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180122172620.GA15913@fieldses.org>
Date: Mon, 22 Jan 2018 12:26:20 -0500
From: "J. Bruce Fields" <bfields@...ldses.org>
To: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
Cc: Arnd Bergmann <arnd@...db.de>, Jeff Layton <jlayton@...nel.org>,
Chuck Lever <chuck.lever@...cle.com>,
Trond Myklebust <trond.myklebust@...marydata.com>,
Kinglong Mee <kinglongmee@...il.com>,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFSD: hide unused svcxdr_dupstr()
On Fri, Jan 19, 2018 at 10:58:27PM +0100, Rasmus Villemoes wrote:
> On 2018-01-19 15:54, Arnd Bergmann wrote:
> > There is now only one caller left for svcxdr_dupstr() and this is inside
> > of an #ifdef, so we can get a warning when the option is disabled:
> >
> > fs/nfsd/nfs4xdr.c:241:1: error: 'svcxdr_dupstr' defined but not used [-Werror=unused-function]
> >
> > This adds another #ifdef around the definition.
>
> Why not instead do
>
> -#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
> - if (bmval[2] & FATTR4_WORD2_SECURITY_LABEL) {
> + if (IS_ENABLED(CONFIG_NFSD_V4_SECURITY_LABEL) && bmval[2] &
> FATTR4_WORD2_SECURITY_LABEL)
>
> (sorry for whitespace damage, not a real patch).
That'd be OK with me too.
--b.
Powered by blists - more mailing lists