RDMA/cma: Fix gcc warning
authorPaul Bolle <pebolle@tiscali.nl>
Wed, 24 Jul 2013 22:06:07 +0000 (15:06 -0700)
committerRoland Dreier <roland@purestorage.com>
Tue, 30 Jul 2013 23:11:22 +0000 (16:11 -0700)
commit8fb488d740582314534c278b5d1e3a1888b850b9
tree5738d63f359794d2accab7a9ae8255e4e9b1a77b
parent3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b
RDMA/cma: Fix gcc warning

Building cma.o triggers this gcc warning:

    drivers/infiniband/core/cma.c: In function ‘rdma_resolve_addr’:
    drivers/infiniband/core/cma.c:465:23: warning: ‘port’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    drivers/infiniband/core/cma.c:426:5: note: ‘port’ was declared here

This is a false positive, as "port" will always be initialized if we're
at "found". But if we assign to "id_priv->id.port_num" directly, we can
drop "port". That will, obviously, silence gcc.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/cma.c