Commit a3d8e159 authored by Andrew Morton's avatar Andrew Morton Committed by Roland Dreier

IB/mlx4: Fix uninitialized-var warning in mlx4_ib_post_send()

    drivers/infiniband/hw/mlx4/qp.c: In function 'mlx4_ib_post_send':
    drivers/infiniband/hw/mlx4/qp.c:1460: warning: 'seglen' may be used uninitialized in this function

This is the dopey gcc-doesn't-know-that-foo(&var)-writes-to-var problem.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent df3f0da8
...@@ -1457,7 +1457,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -1457,7 +1457,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
unsigned ind; unsigned ind;
int uninitialized_var(stamp); int uninitialized_var(stamp);
int uninitialized_var(size); int uninitialized_var(size);
unsigned seglen; unsigned uninitialized_var(seglen);
int i; int i;
spin_lock_irqsave(&qp->sq.lock, flags); spin_lock_irqsave(&qp->sq.lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment