All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Fields <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Jeff Layton <jlayton@kernel.org>,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	Kinglong Mee <kinglongmee@gmail.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFSD: hide unused svcxdr_dupstr()
Date: Fri, 19 Jan 2018 11:27:19 -0500	[thread overview]
Message-ID: <20180119162719.GB12065@fieldses.org> (raw)
In-Reply-To: <894D5C4E-5AC6-4E77-A318-875433D0E45D@oracle.com>

On Fri, Jan 19, 2018 at 11:15:33AM -0500, Chuck Lever wrote:
> 
> 
> > On Jan 19, 2018, at 9:54 AM, Arnd Bergmann <arnd@arndb.de> 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.
> > 
> > Fixes: e40d99e6183e ("NFSD: Clean up symlink argument XDR decoders")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Seems OK to me, and sorry for the noise.
> 
> Reviewed-by: Chuck Lever <chuck.lever@oracle.com>

Thanks!

--b.

> 
> 
> > ---
> > fs/nfsd/nfs4xdr.c | 2 ++
> > 1 file changed, 2 insertions(+)
> > 
> > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> > index f51c9cccaf78..374a62af6034 100644
> > --- a/fs/nfsd/nfs4xdr.c
> > +++ b/fs/nfsd/nfs4xdr.c
> > @@ -237,6 +237,7 @@ svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, u32 len)
> >  * Note null-terminating in place usually isn't safe since the
> >  * buffer might end on a page boundary.
> >  */
> > +#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
> > static char *
> > svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len)
> > {
> > @@ -248,6 +249,7 @@ svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len)
> > 	p[len] = '\0';
> > 	return p;
> > }
> > +#endif
> > 
> > /**
> >  * savemem - duplicate a chunk of memory for later processing
> > -- 
> > 2.9.0
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> Chuck Lever
> 
> 

  reply	other threads:[~2018-01-19 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 14:54 [PATCH] NFSD: hide unused svcxdr_dupstr() Arnd Bergmann
2018-01-19 16:15 ` Chuck Lever
2018-01-19 16:15   ` Chuck Lever
2018-01-19 16:27   ` Bruce Fields [this message]
2018-01-19 21:58 ` Rasmus Villemoes
2018-01-22 17:26   ` 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=20180119162719.GB12065@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=arnd@arndb.de \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=kinglongmee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --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 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.