Skip to content

Commit

Permalink
IB/mlx4: Fix uninitialized-var warning in mlx4_ib_post_send()
Browse files Browse the repository at this point in the history
    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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Andrew Morton authored and Roland Dreier committed May 16, 2008
1 parent df3f0da commit a3d8e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mlx4/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
unsigned ind;
int uninitialized_var(stamp);
int uninitialized_var(size);
unsigned seglen;
unsigned uninitialized_var(seglen);
int i;

spin_lock_irqsave(&qp->sq.lock, flags);
Expand Down

0 comments on commit a3d8e15

Please sign in to comment.