]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sunrpc: fix warning in net/sunrpc/xprtrdma/svc_rdma_transport.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:49:37 +0000 (16:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:49:37 +0000 (16:49 -0800)
this warning:

  net/sunrpc/xprtrdma/svc_rdma_transport.c: In function ‘svc_rdma_accept’:
  net/sunrpc/xprtrdma/svc_rdma_transport.c:830: warning: ‘dma_mr_acc’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) flow connection
between need_dma_mr and dma_mr_acc.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sunrpc/xprtrdma/svc_rdma_transport.c

index f8500f018f8ad0d2f2e2edca55b87dd196e05b19..8872914aa4cfe7088fbcc86c62ee01d0f8f1128a 100644 (file)
@@ -827,7 +827,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
        struct rdma_conn_param conn_param;
        struct ib_qp_init_attr qp_attr;
        struct ib_device_attr devattr;
-       int dma_mr_acc;
+       int uninitialized_var(dma_mr_acc);
        int need_dma_mr;
        int ret;
        int i;