aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-11 15:22:54 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-11 19:30:02 -0400
commit09acfea5d8de419ebe84be43b08f7b79c965215f (patch)
tree16f7ef15b00d8601917de6812b9ac951c9458ef6
parent17280175c587469b34757263c7cfc608f0ea2334 (diff)
SUNRPC: Fix a few sparse warnings
net/sunrpc/svcsock.c:412:22: warning: incorrect type in assignment (different address spaces) - svc_partial_recvfrom now takes a struct kvec, so the variable save_iovbase needs to be an ordinary (void *) Make a bunch of variables in net/sunrpc/xprtsock.c static Fix a couple of "warning: symbol 'foo' was not declared. Should it be static?" reports. Fix a couple of conflicting function declarations. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--include/linux/sunrpc/bc_xprt.h2
-rw-r--r--include/linux/sunrpc/svcauth.h3
-rw-r--r--include/linux/sunrpc/xprtsock.h12
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_mech.c2
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_seal.c2
-rw-r--r--net/sunrpc/backchannel_rqst.c1
-rw-r--r--net/sunrpc/rpc_pipe.c2
-rw-r--r--net/sunrpc/sunrpc_syms.c3
-rw-r--r--net/sunrpc/svcsock.c2
-rw-r--r--net/sunrpc/xprtsock.c10
10 files changed, 14 insertions, 25 deletions
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h
index f7f3ce340c0..969c0a671db 100644
--- a/include/linux/sunrpc/bc_xprt.h
+++ b/include/linux/sunrpc/bc_xprt.h
@@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); 35struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt);
36void xprt_free_bc_request(struct rpc_rqst *req); 36void xprt_free_bc_request(struct rpc_rqst *req);
37int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); 37int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
38void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); 38void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs);
39int bc_send(struct rpc_rqst *req); 39int bc_send(struct rpc_rqst *req);
40 40
41/* 41/*
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
index 25d333c1b57..548790e9113 100644
--- a/include/linux/sunrpc/svcauth.h
+++ b/include/linux/sunrpc/svcauth.h
@@ -135,6 +135,9 @@ extern void svcauth_unix_purge(void);
135extern void svcauth_unix_info_release(struct svc_xprt *xpt); 135extern void svcauth_unix_info_release(struct svc_xprt *xpt);
136extern int svcauth_unix_set_client(struct svc_rqst *rqstp); 136extern int svcauth_unix_set_client(struct svc_rqst *rqstp);
137 137
138extern int unix_gid_cache_create(struct net *net);
139extern void unix_gid_cache_destroy(struct net *net);
140
138static inline unsigned long hash_str(char *name, int bits) 141static inline unsigned long hash_str(char *name, int bits)
139{ 142{
140 unsigned long hash = 0; 143 unsigned long hash = 0;
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h
index 3f14a02e9cc..1ad36cc25b2 100644
--- a/include/linux/sunrpc/xprtsock.h
+++ b/include/linux/sunrpc/xprtsock.h
@@ -12,18 +12,6 @@
12int init_socket_xprt(void); 12int init_socket_xprt(void);
13void cleanup_socket_xprt(void); 13void cleanup_socket_xprt(void);
14 14
15/*
16 * RPC slot table sizes for UDP, TCP transports
17 */
18extern unsigned int xprt_udp_slot_table_entries;
19extern unsigned int xprt_tcp_slot_table_entries;
20
21/*
22 * Parameters for choosing a free port
23 */
24extern unsigned int xprt_min_resvport;
25extern unsigned int xprt_max_resvport;
26
27#define RPC_MIN_RESVPORT (1U) 15#define RPC_MIN_RESVPORT (1U)
28#define RPC_MAX_RESVPORT (65535U) 16#define RPC_MAX_RESVPORT (65535U)
29#define RPC_DEF_MIN_RESVPORT (665U) 17#define RPC_DEF_MIN_RESVPORT (665U)
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 8c67890de42..8eff8c32d1b 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -344,7 +344,7 @@ out_err:
344 return PTR_ERR(p); 344 return PTR_ERR(p);
345} 345}
346 346
347struct crypto_blkcipher * 347static struct crypto_blkcipher *
348context_v2_alloc_cipher(struct krb5_ctx *ctx, const char *cname, u8 *key) 348context_v2_alloc_cipher(struct krb5_ctx *ctx, const char *cname, u8 *key)
349{ 349{
350 struct crypto_blkcipher *cp; 350 struct crypto_blkcipher *cp;
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c
index d7941eab779..62ae3273186 100644
--- a/net/sunrpc/auth_gss/gss_krb5_seal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_seal.c
@@ -159,7 +159,7 @@ gss_get_mic_v1(struct krb5_ctx *ctx, struct xdr_buf *text,
159 return (ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE; 159 return (ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE;
160} 160}
161 161
162u32 162static u32
163gss_get_mic_v2(struct krb5_ctx *ctx, struct xdr_buf *text, 163gss_get_mic_v2(struct krb5_ctx *ctx, struct xdr_buf *text,
164 struct xdr_netobj *token) 164 struct xdr_netobj *token)
165{ 165{
diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c
index 3ad435a14ad..31def68a0f6 100644
--- a/net/sunrpc/backchannel_rqst.c
+++ b/net/sunrpc/backchannel_rqst.c
@@ -25,6 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/sunrpc/xprt.h> 26#include <linux/sunrpc/xprt.h>
27#include <linux/export.h> 27#include <linux/export.h>
28#include <linux/sunrpc/bc_xprt.h>
28 29
29#ifdef RPC_DEBUG 30#ifdef RPC_DEBUG
30#define RPCDBG_FACILITY RPCDBG_TRANS 31#define RPCDBG_FACILITY RPCDBG_TRANS
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 7d96e3cd57c..8584ec068e9 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -1149,7 +1149,7 @@ rpc_mount(struct file_system_type *fs_type,
1149 return mount_ns(fs_type, flags, current->nsproxy->net_ns, rpc_fill_super); 1149 return mount_ns(fs_type, flags, current->nsproxy->net_ns, rpc_fill_super);
1150} 1150}
1151 1151
1152void rpc_kill_sb(struct super_block *sb) 1152static void rpc_kill_sb(struct super_block *sb)
1153{ 1153{
1154 struct net *net = sb->s_fs_info; 1154 struct net *net = sb->s_fs_info;
1155 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); 1155 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index 21d106e2ca0..8adfc88e793 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -27,9 +27,6 @@
27int sunrpc_net_id; 27int sunrpc_net_id;
28EXPORT_SYMBOL_GPL(sunrpc_net_id); 28EXPORT_SYMBOL_GPL(sunrpc_net_id);
29 29
30extern int unix_gid_cache_create(struct net *net);
31extern int unix_gid_cache_destroy(struct net *net);
32
33static __net_init int sunrpc_init_net(struct net *net) 30static __net_init int sunrpc_init_net(struct net *net)
34{ 31{
35 int err; 32 int err;
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index e088b1633d3..40ae884db86 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -396,7 +396,7 @@ static int svc_partial_recvfrom(struct svc_rqst *rqstp,
396 int buflen, unsigned int base) 396 int buflen, unsigned int base)
397{ 397{
398 size_t save_iovlen; 398 size_t save_iovlen;
399 void __user *save_iovbase; 399 void *save_iovbase;
400 unsigned int i; 400 unsigned int i;
401 int ret; 401 int ret;
402 402
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 4c8281d29e2..92bc5181dbe 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -53,12 +53,12 @@ static void xs_close(struct rpc_xprt *xprt);
53/* 53/*
54 * xprtsock tunables 54 * xprtsock tunables
55 */ 55 */
56unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE; 56static unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE;
57unsigned int xprt_tcp_slot_table_entries = RPC_MIN_SLOT_TABLE; 57static unsigned int xprt_tcp_slot_table_entries = RPC_MIN_SLOT_TABLE;
58unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE; 58static unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE;
59 59
60unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT; 60static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
61unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT; 61static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
62 62
63#define XS_TCP_LINGER_TO (15U * HZ) 63#define XS_TCP_LINGER_TO (15U * HZ)
64static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; 64static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO;