diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-11 15:22:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-11 19:30:02 -0400 |
commit | 09acfea5d8de419ebe84be43b08f7b79c965215f (patch) | |
tree | 16f7ef15b00d8601917de6812b9ac951c9458ef6 | |
parent | 17280175c587469b34757263c7cfc608f0ea2334 (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.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/svcauth.h | 3 | ||||
-rw-r--r-- | include/linux/sunrpc/xprtsock.h | 12 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_mech.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_seal.c | 2 | ||||
-rw-r--r-- | net/sunrpc/backchannel_rqst.c | 1 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 2 | ||||
-rw-r--r-- | net/sunrpc/sunrpc_syms.c | 3 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 2 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 10 |
10 files changed, 14 insertions, 25 deletions
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index f7f3ce340c08..969c0a671dbf 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. | |||
35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | 35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); |
36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); |
39 | int bc_send(struct rpc_rqst *req); | 39 | int 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 25d333c1b571..548790e9113b 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -135,6 +135,9 @@ extern void svcauth_unix_purge(void); | |||
135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); | 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
137 | 137 | ||
138 | extern int unix_gid_cache_create(struct net *net); | ||
139 | extern void unix_gid_cache_destroy(struct net *net); | ||
140 | |||
138 | static inline unsigned long hash_str(char *name, int bits) | 141 | static 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 3f14a02e9cc0..1ad36cc25b2e 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
@@ -12,18 +12,6 @@ | |||
12 | int init_socket_xprt(void); | 12 | int init_socket_xprt(void); |
13 | void cleanup_socket_xprt(void); | 13 | void cleanup_socket_xprt(void); |
14 | 14 | ||
15 | /* | ||
16 | * RPC slot table sizes for UDP, TCP transports | ||
17 | */ | ||
18 | extern unsigned int xprt_udp_slot_table_entries; | ||
19 | extern unsigned int xprt_tcp_slot_table_entries; | ||
20 | |||
21 | /* | ||
22 | * Parameters for choosing a free port | ||
23 | */ | ||
24 | extern unsigned int xprt_min_resvport; | ||
25 | extern 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 8c67890de427..8eff8c32d1b9 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 | ||
347 | struct crypto_blkcipher * | 347 | static struct crypto_blkcipher * |
348 | context_v2_alloc_cipher(struct krb5_ctx *ctx, const char *cname, u8 *key) | 348 | context_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 d7941eab7796..62ae3273186c 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 | ||
162 | u32 | 162 | static u32 |
163 | gss_get_mic_v2(struct krb5_ctx *ctx, struct xdr_buf *text, | 163 | gss_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 3ad435a14ada..31def68a0f6e 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 7d96e3cd57cc..8584ec068e97 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 | ||
1152 | void rpc_kill_sb(struct super_block *sb) | 1152 | static 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 21d106e2ca06..8adfc88e793a 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
@@ -27,9 +27,6 @@ | |||
27 | int sunrpc_net_id; | 27 | int sunrpc_net_id; |
28 | EXPORT_SYMBOL_GPL(sunrpc_net_id); | 28 | EXPORT_SYMBOL_GPL(sunrpc_net_id); |
29 | 29 | ||
30 | extern int unix_gid_cache_create(struct net *net); | ||
31 | extern int unix_gid_cache_destroy(struct net *net); | ||
32 | |||
33 | static __net_init int sunrpc_init_net(struct net *net) | 30 | static __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 e088b1633d36..40ae884db865 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 4c8281d29e2b..92bc5181dbeb 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 | */ |
56 | unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE; | 56 | static unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE; |
57 | unsigned int xprt_tcp_slot_table_entries = RPC_MIN_SLOT_TABLE; | 57 | static unsigned int xprt_tcp_slot_table_entries = RPC_MIN_SLOT_TABLE; |
58 | unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE; | 58 | static unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE; |
59 | 59 | ||
60 | unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT; | 60 | static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT; |
61 | unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT; | 61 | static 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) |
64 | static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; | 64 | static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; |