fs/nfs: fix some -Wmissing-prototypes warnings we get a warning when building kernel with W=1: fs/nfs/nfs4file.c:318:1: warning: no previous prototype for ‘nfs42_ssc_open’ [-Wmissing-prototypes] fs/nfs/nfs4file.c:402:6: warning: no previous prototype for ‘nfs42_ssc_close’ [-Wmissing-prototypes]
Subsystems (2)
PATCH 1/1 fs/nfs: fix some -Wmissing-prototypes warnings we get a warning when building kernel with W=1: fs/nfs/nfs4file.c:318:1: warning: no previous prototype for ‘nfs42_ssc_open’ [-Wmissing-prototypes] fs/nfs/nfs4file.c:402:6: warning: no previous prototype for ‘nfs42_ssc_close’ [-Wmissing-prototypes]
Add the missing declaration in head file fs/nfs/nfs4_fs.h to fix this.
--- fs/nfs/nfs4_fs.h | 6 ++++++ 1 file changed, 6 insertions(+)
fs/nfs/nfs4_fs.h +6 -0
@@ -656,4 +656,10 @@ static inline void nfs4_xattr_cache_zap(struct inode *inode)#endif /* CONFIG_NFS_V4 */ + +/* nfs4file.c */ +#ifdef CONFIG_NFS_V4_2 +struct file *nfs42_ssc_open (struct vfsmount *ss_mnt,struct nfs_fh *src_fh,nfs4_stateid *stateid); +void nfs42_ssc_close (struct file *filep); +#endif #endif /* __LINUX_FS_NFS_NFS4_FS.H */
Signature · 1 line
2.25.1
Hi Alex,
Thanks for the patch!
Quoted 2 lines · Alex
Add the missing declaration in head file
fs/nfs/nfs4_fs.hto fix this.
It looks like the declarations are already in the file linux/nfs_ssc.h, which is included by nfs4file.c but they're only there if CONFIG_NFSD_V4_2_INTER_SSC=y (I'm guessing you compiled with this set to 'n'). A better solution is probably to define a #else condition with empty functions for the case when CONFIG_NFSD_V4_2_INTER_SSC=n.
I hope this helps!
Anna
Quoted 24 lines
Signed-off-by Alex <[email protected]>--- fs/nfs/nfs4_fs.h | 6 ++++++ 1 file changed, 6 insertions(+)fs/nfs/nfs4_fs.h +6
-1@@ -656,4 +656,10 @@ static inline void nfs4_xattr_cache_zap(struct inode *inode)#endif /* CONFIG_NFS_V4 */ + +/* nfs4file.c */ +#ifdef CONFIG_NFS_V4_2 +struct file *nfs42_ssc_open (struct vfsmount *ss_mnt,struct nfs_fh *src_fh,nfs4_stateid *stateid); +void nfs42_ssc_close (struct file *filep); +#endif #endif /* __LINUX_FS_NFS_NFS4_FS.H */ --2.25.1