* [PATCH] 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]
@ 2021-06-02 12:21 Alex
2021-06-04 16:18 ` Anna Schumaker
0 siblings, 1 reply; 2+ messages in thread
From: Alex @ 2021-06-02 12:21 UTC (permalink / raw)
To: trond.myklebust, anna.schumaker; +Cc: linux-kernel, linux-nfs, zgxgoo
Add the missing declaration in head file fs/nfs/nfs4_fs.h to fix this.
Signed-off-by: Alex <zgxgoo@gmail.com>
---
fs/nfs/nfs4_fs.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 0c9505dc852c..0cb79afa0a63 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] 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]
2021-06-02 12:21 [PATCH] 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] Alex
@ 2021-06-04 16:18 ` Anna Schumaker
0 siblings, 0 replies; 2+ messages in thread
From: Anna Schumaker @ 2021-06-04 16:18 UTC (permalink / raw)
To: Alex; +Cc: Trond Myklebust, Linux Kernel Mailing List, Linux NFS Mailing List
Hi Alex,
Thanks for the patch!
On Wed, Jun 2, 2021 at 8:26 AM Alex <zgxgoo@gmail.com> wrote:
>
> Add the missing declaration in head file fs/nfs/nfs4_fs.h to 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
>
> Signed-off-by: Alex <zgxgoo@gmail.com>
> ---
> fs/nfs/nfs4_fs.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
> index 0c9505dc852c..0cb79afa0a63 100644
> --- a/fs/nfs/nfs4_fs.h
> +++ b/fs/nfs/nfs4_fs.h
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-04 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 12:21 [PATCH] 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] Alex
2021-06-04 16:18 ` Anna Schumaker
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.