Skip to contentSkip to conversation

nfs: few cleanup patches inspired by sparse

PATCH New Stanislav Kinsbursky 1 participant 6 messages Oct 2, 2012

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/5 nfs: include NFSv4 header in netns.h

In reply to Stanislav Kinsbursky

Build error:
fs/nfs/netns.h:27:15: error: 'NFS4_MAX_MINOR_VERSION' undeclared here (not in a function)

---
 fs/nfs/netns.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfs/netns.h +1 -0
index b9c7f9b..8ee1fab 100644
@@ -5,6 +5,7 @@
 #ifndef __NFS_NETNS_H__
 #define __NFS_NETNS_H__
 
+#include <linux/nfs4.h>
 #include <net/net_namespace.h>
 #include <net/netns/generic.h>
 
#2 lore raw

PATCH 2/5 nfs: declare nfs_callback_tcp_port in header

In reply to Stanislav Kinsbursky

Sparse warning:
fs/nfs/super.c:2638:16: sparse: symbol 'nfs_callback_tcpport' was not declared. Should it be static?

---
 fs/nfs/callback.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfs/callback.h +1 -0
index c07a8d4..4251c2a 100644
@@ -208,5 +208,6 @@ extern int nfs4_set_callback_sessionid(struct nfs_client *clp);
 #define NFS41_BC_MAX_CALLBACKS 1
 
 extern unsigned int nfs_callback_set_tcpport;
+extern unsigned short nfs_callback_tcpport;
 
 #endif /* __LINUX_FS_NFS_CALLBACK_H */
#0 lore raw

cover nfs: few cleanup patches inspired by sparse

First two patched fixes problems reported by Fengguang Wu <[email protected]>.

The following series implements...

---

Stanislav Kinsbursky (5):
nfs: include NFSv4 header in netns.h
nfs: declare nfs_callback_tcp_port in header
nfs: declare nfs_xdev_mount as static
nfs: include nfs4_fh.h in nfs4sysctl.c
nfs: include internah.h in getroot.h

 fs/nfs/callback.h   |    1 +
 fs/nfs/getroot.c    |    2 ++
 fs/nfs/netns.h      |    1 +
 fs/nfs/nfs4sysctl.c |    1 +
 fs/nfs/super.c      |    2 +-
 5 files changed, 6 insertions(+), 1 deletions(-)
#3 lore raw

PATCH 3/5 nfs: declare nfs_xdev_mount as static

Sparse warning:
fs/nfs/super.c:2517:15: warning: symbol 'nfs_xdev_mount' was not declared. Should it be static?

---
 fs/nfs/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/super.c +1 -1
index a719bc0..b4079bb 100644
@@ -2514,7 +2514,7 @@ EXPORT_SYMBOL_GPL(nfs_kill_super);
 /*
  * Clone an NFS2/3/4 server record on xdev traversal (FSID-change)
  */
-struct dentry *
+static struct dentry *
 nfs_xdev_mount(struct file_system_type *fs_type, int flags,
 		const char *dev_name, void *raw_data)
 {
#4 lore raw

PATCH 4/5 nfs: include nfs4_fh.h in nfs4sysctl.c

In reply to Stanislav Kinsbursky

Sparse warnings:
fs/nfs/nfs4sysctl.c:56:5: warning: symbol 'nfs4_register_sysctl' was not declared. Should it be static?
fs/nfs/nfs4sysctl.c:64:6: warning: symbol 'nfs4_unregister_sysctl' was not declared. Should it be static?

---
 fs/nfs/nfs4sysctl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfs/nfs4sysctl.c +1 -0
index 5729bc8..2628d92 100644
@@ -9,6 +9,7 @@
 #include <linux/nfs_idmap.h>
 #include <linux/nfs_fs.h>
 
+#include "nfs4_fs.h"
 #include "callback.h"
 
 static const int nfs_set_port_min = 0;
#5 lore raw

PATCH 5/5 nfs: include internah.h in getroot.h

In reply to Stanislav Kinsbursky

Sparse warning:
fs/nfs/nfs4getroot.c:11:5: warning: symbol 'nfs4_get_rootfh' was not declared. Should it be static?

---
 fs/nfs/getroot.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/nfs/getroot.c +2 -0
index 4654ced..033803c 100644
@@ -32,6 +32,8 @@
 
 #include <asm/uaccess.h>
 
+#include "internal.h"
+
 #define NFSDBG_FACILITY		NFSDBG_CLIENT
 
 /*