From: Trond Myklebust Date: Fri, 4 May 2012 17:54:24 +0000 (-0400) Subject: NFS: Fix sparse warnings X-Git-Tag: v3.5-rc1~52^2~86 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1385b8117325e79f74c1e7d1cbf45c789deb85c5;p=~emulex%2Finfiniband.git NFS: Fix sparse warnings Fix the following sparse warnings: fs/nfs/direct.c:221:6: warning: symbol 'nfs_direct_readpage_release' was not declared. Should it be static? fs/nfs/read.c:38:43: warning: non-ANSI function declaration of function 'nfs_readhdr_alloc' fs/nfs/objlayout/objio_osd.c:214:5: warning: symbol '__alloc_objio_seg' was not declared. Should it be static? Reported-by: Dan Carpenter Signed-off-by: Trond Myklebust Cc: Fred Isaman Cc: Boaz Harrosh --- diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index dca9c814300..257d0091148 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -218,7 +218,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq) nfs_direct_req_release(dreq); } -void nfs_direct_readpage_release(struct nfs_page *req) +static void nfs_direct_readpage_release(struct nfs_page *req) { dprintk("NFS: direct read done (%s/%lld %d@%lld)\n", req->wb_context->dentry->d_inode->i_sb->s_id, diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c index fbf4874ec25..b47277baeba 100644 --- a/fs/nfs/objlayout/objio_osd.c +++ b/fs/nfs/objlayout/objio_osd.c @@ -211,7 +211,7 @@ static void copy_single_comp(struct ore_components *oc, unsigned c, memcpy(ocomp->cred, src_comp->oc_cap.cred, sizeof(ocomp->cred)); } -int __alloc_objio_seg(unsigned numdevs, gfp_t gfp_flags, +static int __alloc_objio_seg(unsigned numdevs, gfp_t gfp_flags, struct objio_segment **pseg) { /* This is the in memory structure of the objio_segment diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 37c9eb2930b..f23cf255bd3 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -35,7 +35,7 @@ static const struct nfs_pgio_completion_ops nfs_async_read_completion_ops; static struct kmem_cache *nfs_rdata_cachep; -struct nfs_read_header *nfs_readhdr_alloc() +struct nfs_read_header *nfs_readhdr_alloc(void) { struct nfs_read_header *rhdr;