NFS: Fix sparse warnings
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 4 May 2012 17:54:24 +0000 (13:54 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 4 May 2012 18:59:51 +0000 (14:59 -0400)
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 <dan.carpenter@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
fs/nfs/direct.c
fs/nfs/objlayout/objio_osd.c
fs/nfs/read.c

index dca9c81430095c6c6ceec588417c4829991cb968..257d0091148b6b079ddc2204aa2138ace774a078 100644 (file)
@@ -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,
index fbf4874ec25218d5c01dac8f039388cad5d854a6..b47277baebab92930bee6c1fbac445fd8978a6b9 100644 (file)
@@ -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
index 37c9eb2930b0d816761f938b36e79d4952a70a5f..f23cf255bd395def2c6650dac06c7b8da59cbc96 100644 (file)
@@ -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;