diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2015-05-14 18:17:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-14 22:28:48 -0400 |
commit | c1c52db16e26a26b545821abae303310a074350f (patch) | |
tree | dcc0cfdc01faf904d475db5c5b708e505d401cd1 /net/switchdev | |
parent | e87a468eb97da35d8dc00e8fa9828b4de4ab69d0 (diff) | |
download | blackbird-op-linux-c1c52db16e26a26b545821abae303310a074350f.tar.gz blackbird-op-linux-c1c52db16e26a26b545821abae303310a074350f.zip |
net/mlx4: Avoid 'may be used uninitialized' warnings
With a cross-compiler based on gcc-4.9, I see warnings like the following:
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mlx4_SW2HW_CQ_wrapper':
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3048:10: error: 'cq' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cq->mtt = mtt;
I think the warning is spurious because we only use cq when
cq_res_start_move_to() returns zero, and it always initializes *cq in that
case. The srq case is similar. But maybe gcc isn't smart enough to figure
that out.
Initialize cq and srq explicitly to avoid the warnings.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev')
0 files changed, 0 insertions, 0 deletions