alistair23-linux/drivers/infiniband/hw
Paul Bolle 57d88cffc8 IB/mlx4: Fix compiler warning about uninitialized 'vlan' variable
Building qp.o triggers this gcc warning:

    drivers/infiniband/hw/mlx4/qp.c: In function ‘mlx4_ib_post_send’:
    drivers/infiniband/hw/mlx4/qp.c:1862:62: warning: ‘vlan’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    drivers/infiniband/hw/mlx4/qp.c:1752:6: note: ‘vlan’ was declared here

Looking at the code it is clear 'vlan' is only set and used if 'is_eth'
is non-zero. But by initializing 'vlan' to 0xffff, on

    gcc (Ubuntu 4.7.2-22ubuntu1) 4.7.2

on x86-64 at least, we fix the warning, and the compiler was already
setting 'vlan' to 0 in the generated code, so there's no real downside.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>

[ Get rid of unnecessary move of 'is_vlan' initialization.  - Roland ]

Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-02-25 09:17:13 -08:00
..
amso1100 Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
cxgb3 RDMA/cxgb3: use WARN 2012-11-26 11:08:16 -08:00
cxgb4 RDMA/cxgb4: Fix bug for active and passive LE hash collision path 2012-12-19 23:03:12 -08:00
ehca Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
ipath Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
mlx4 IB/mlx4: Fix compiler warning about uninitialized 'vlan' variable 2013-02-25 09:17:13 -08:00
mthca Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
nes Drivers: infinband: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
ocrdma
qib IB/qib: Fix for broken sparse warning fix 2013-02-05 09:43:09 -08:00