Re: [PATCH] NFS: Fix a number of sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-03-12 at 11:17 -0400, Bryan Schumaker wrote:
> On 03/11/2012 01:45 PM, Trond Myklebust wrote:
> 
> > Fix a number of "warning: symbol 'foo' was not declared. Should it be
> > static?" conditions.
> > 
> > fs/nfs/delegation.c:263:31: warning: restricted fmode_t degrades to integer
> >   - We want to allow upgrades to a WRITE delegation, but should otherwise
> >     consider servers that hand out duplicate delegations to be borken.
> > 
> > Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
> > ---
> >  fs/nfs/callback.c            |    4 ++--
> >  fs/nfs/client.c              |    5 ++---
> >  fs/nfs/delegation.c          |    5 ++++-
> >  fs/nfs/dns_resolve.c         |    1 +
> >  fs/nfs/idmap.c               |    8 ++++----
> >  fs/nfs/nfs4filelayout.c      |   10 +++++-----
> >  fs/nfs/nfs4filelayoutdev.c   |    4 ++--
> >  fs/nfs/nfs4proc.c            |   23 ++++++++++++-----------
> >  fs/nfs/nfs4state.c           |    3 ++-
> >  fs/nfs/objlayout/objlayout.c |    2 +-
> >  fs/nfs/pnfs_dev.c            |    2 +-
> >  fs/nfs/unlink.c              |    2 +-
> >  12 files changed, 37 insertions(+), 32 deletions(-)
> > 
> > diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
> > index 2afe233..eb95f50 100644
> > --- a/fs/nfs/callback.c
> > +++ b/fs/nfs/callback.c
> > @@ -101,7 +101,7 @@ nfs4_callback_svc(void *vrqstp)
> >  /*
> >   * Prepare to bring up the NFSv4 callback service
> >   */
> > -struct svc_rqst *
> > +static struct svc_rqst *
> >  nfs4_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
> >  {
> >  	int ret;
> > @@ -172,7 +172,7 @@ nfs41_callback_svc(void *vrqstp)
> >  /*
> >   * Bring up the NFSv4.1 callback service
> >   */
> > -struct svc_rqst *
> > +static struct svc_rqst *
> >  nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
> >  {
> >  	struct svc_rqst *rqstp;
> > diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> > index d30dcbf..f1f047c 100644
> > --- a/fs/nfs/client.c
> > +++ b/fs/nfs/client.c
> > @@ -443,9 +443,8 @@ static int nfs_sockaddr_cmp(const struct sockaddr *sa1,
> >  }
> >  
> >  /* Common match routine for v4.0 and v4.1 callback services */
> > -bool
> > -nfs4_cb_match_client(const struct sockaddr *addr, struct nfs_client *clp,
> > -		     u32 minorversion)
> > +static bool nfs4_cb_match_client(const struct sockaddr *addr,
> > +		struct nfs_client *clp, u32 minorversion)
> >  {
> >  	struct sockaddr *clap = (struct sockaddr *)&clp->cl_addr;
> 
> 
> Now that this function is static, gcc gives me this warning: 
>   CC [M]  fs/nfs/client.o
> fs/nfs/client.c:446:13: warning: 'nfs4_cb_match_client' defined but not used [-Wunused-function]
> 
> It looks like the only user of this function is nfs4_find_client_sessionid, so when v4.1 isn't enabled the function isn't used.  Would you like me to send in a separate patch for this?
> 

Yes please!
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux