* [PATCH] drivers: infiniband: Fix compiler warning
@ 2013-01-25 21:52 Stratos Karafotis
0 siblings, 0 replies; only message in thread
From: Stratos Karafotis @ 2013-01-25 21:52 UTC (permalink / raw)
To: Roland Dreier, Sean Hefty, Or Gerlitz; +Cc: linux-rdma, linux-kernel
This patch fixes the following compiler warning of uninitialized variable
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
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
drivers/infiniband/hw/mlx4/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 19e0637..37829b6 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1749,7 +1749,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr,
int is_eth;
int is_vlan = 0;
int is_grh;
- u16 vlan;
+ u16 vlan = 0;
int err = 0;
send_size = 0;
--
1.8.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-25 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 21:52 [PATCH] drivers: infiniband: Fix compiler warning Stratos Karafotis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).