aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-20 09:22:00 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-21 09:31:44 -0400
commitffa94db6042e6fd014ae0bed8832ac707ef2afe9 (patch)
treec2e98dc23546be53b311bf4eb010e824709e4d76 /net/sunrpc
parent9304a8120a6ac06d08874d2aec76f52d3376dfe4 (diff)
SUNRPC/LOCKD: Fix build warnings when CONFIG_SUNRPC_DEBUG is undefined
Stephen Rothwell reports: net/sunrpc/rpcb_clnt.c: In function 'rpcb_enc_mapping': net/sunrpc/rpcb_clnt.c:820:19: warning: unused variable 'task' [-Wunused-variable] net/sunrpc/rpcb_clnt.c: In function 'rpcb_dec_getport': net/sunrpc/rpcb_clnt.c:837:19: warning: unused variable 'task' [-Wunused-variable] net/sunrpc/rpcb_clnt.c: In function 'rpcb_dec_set': net/sunrpc/rpcb_clnt.c:860:19: warning: unused variable 'task' [-Wunused-variable] net/sunrpc/rpcb_clnt.c: In function 'rpcb_enc_getaddr': net/sunrpc/rpcb_clnt.c:892:19: warning: unused variable 'task' [-Wunused-variable] net/sunrpc/rpcb_clnt.c: In function 'rpcb_dec_getaddr': net/sunrpc/rpcb_clnt.c:914:19: warning: unused variable 'task' [-Wunused-variable] fs/lockd/svclock.c:49:20: warning: 'nlmdbg_cookie2a' declared 'static' but never defined [-Wunused-function] Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/rpcb_clnt.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index e699ff0ce909..207a74696c9f 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -817,11 +817,11 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
817static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr, 817static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
818 const struct rpcbind_args *rpcb) 818 const struct rpcbind_args *rpcb)
819{ 819{
820 struct rpc_task *task = req->rq_task;
821 __be32 *p; 820 __be32 *p;
822 821
823 dprintk("RPC: %5u encoding PMAP_%s call (%u, %u, %d, %u)\n", 822 dprintk("RPC: %5u encoding PMAP_%s call (%u, %u, %d, %u)\n",
824 task->tk_pid, task->tk_msg.rpc_proc->p_name, 823 req->rq_task->tk_pid,
824 req->rq_task->tk_msg.rpc_proc->p_name,
825 rpcb->r_prog, rpcb->r_vers, rpcb->r_prot, rpcb->r_port); 825 rpcb->r_prog, rpcb->r_vers, rpcb->r_prot, rpcb->r_port);
826 826
827 p = xdr_reserve_space(xdr, RPCB_mappingargs_sz << 2); 827 p = xdr_reserve_space(xdr, RPCB_mappingargs_sz << 2);
@@ -834,7 +834,6 @@ static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
834static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr, 834static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
835 struct rpcbind_args *rpcb) 835 struct rpcbind_args *rpcb)
836{ 836{
837 struct rpc_task *task = req->rq_task;
838 unsigned long port; 837 unsigned long port;
839 __be32 *p; 838 __be32 *p;
840 839
@@ -845,8 +844,8 @@ static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
845 return -EIO; 844 return -EIO;
846 845
847 port = be32_to_cpup(p); 846 port = be32_to_cpup(p);
848 dprintk("RPC: %5u PMAP_%s result: %lu\n", task->tk_pid, 847 dprintk("RPC: %5u PMAP_%s result: %lu\n", req->rq_task->tk_pid,
849 task->tk_msg.rpc_proc->p_name, port); 848 req->rq_task->tk_msg.rpc_proc->p_name, port);
850 if (unlikely(port > USHRT_MAX)) 849 if (unlikely(port > USHRT_MAX))
851 return -EIO; 850 return -EIO;
852 851
@@ -857,7 +856,6 @@ static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
857static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr, 856static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr,
858 unsigned int *boolp) 857 unsigned int *boolp)
859{ 858{
860 struct rpc_task *task = req->rq_task;
861 __be32 *p; 859 __be32 *p;
862 860
863 p = xdr_inline_decode(xdr, 4); 861 p = xdr_inline_decode(xdr, 4);
@@ -869,7 +867,8 @@ static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr,
869 *boolp = 1; 867 *boolp = 1;
870 868
871 dprintk("RPC: %5u RPCB_%s call %s\n", 869 dprintk("RPC: %5u RPCB_%s call %s\n",
872 task->tk_pid, task->tk_msg.rpc_proc->p_name, 870 req->rq_task->tk_pid,
871 req->rq_task->tk_msg.rpc_proc->p_name,
873 (*boolp ? "succeeded" : "failed")); 872 (*boolp ? "succeeded" : "failed"));
874 return 0; 873 return 0;
875} 874}
@@ -889,11 +888,11 @@ static void encode_rpcb_string(struct xdr_stream *xdr, const char *string,
889static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr, 888static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
890 const struct rpcbind_args *rpcb) 889 const struct rpcbind_args *rpcb)
891{ 890{
892 struct rpc_task *task = req->rq_task;
893 __be32 *p; 891 __be32 *p;
894 892
895 dprintk("RPC: %5u encoding RPCB_%s call (%u, %u, '%s', '%s')\n", 893 dprintk("RPC: %5u encoding RPCB_%s call (%u, %u, '%s', '%s')\n",
896 task->tk_pid, task->tk_msg.rpc_proc->p_name, 894 req->rq_task->tk_pid,
895 req->rq_task->tk_msg.rpc_proc->p_name,
897 rpcb->r_prog, rpcb->r_vers, 896 rpcb->r_prog, rpcb->r_vers,
898 rpcb->r_netid, rpcb->r_addr); 897 rpcb->r_netid, rpcb->r_addr);
899 898
@@ -911,7 +910,6 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
911{ 910{
912 struct sockaddr_storage address; 911 struct sockaddr_storage address;
913 struct sockaddr *sap = (struct sockaddr *)&address; 912 struct sockaddr *sap = (struct sockaddr *)&address;
914 struct rpc_task *task = req->rq_task;
915 __be32 *p; 913 __be32 *p;
916 u32 len; 914 u32 len;
917 915
@@ -928,7 +926,7 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
928 */ 926 */
929 if (len == 0) { 927 if (len == 0) {
930 dprintk("RPC: %5u RPCB reply: program not registered\n", 928 dprintk("RPC: %5u RPCB reply: program not registered\n",
931 task->tk_pid); 929 req->rq_task->tk_pid);
932 return 0; 930 return 0;
933 } 931 }
934 932
@@ -938,8 +936,8 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
938 p = xdr_inline_decode(xdr, len); 936 p = xdr_inline_decode(xdr, len);
939 if (unlikely(p == NULL)) 937 if (unlikely(p == NULL))
940 goto out_fail; 938 goto out_fail;
941 dprintk("RPC: %5u RPCB_%s reply: %s\n", task->tk_pid, 939 dprintk("RPC: %5u RPCB_%s reply: %s\n", req->rq_task->tk_pid,
942 task->tk_msg.rpc_proc->p_name, (char *)p); 940 req->rq_task->tk_msg.rpc_proc->p_name, (char *)p);
943 941
944 if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len, 942 if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len,
945 sap, sizeof(address)) == 0) 943 sap, sizeof(address)) == 0)
@@ -950,7 +948,8 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
950 948
951out_fail: 949out_fail:
952 dprintk("RPC: %5u malformed RPCB_%s reply\n", 950 dprintk("RPC: %5u malformed RPCB_%s reply\n",
953 task->tk_pid, task->tk_msg.rpc_proc->p_name); 951 req->rq_task->tk_pid,
952 req->rq_task->tk_msg.rpc_proc->p_name);
954 return -EIO; 953 return -EIO;
955} 954}
956 955