From: Andrew Morton Date: Fri, 16 May 2008 21:28:30 +0000 (-0700) Subject: IB/mlx4: Fix uninitialized-var warning in mlx4_ib_post_send() X-Git-Tag: v2.6.26-rc4~58^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a3d8e1591dc90d359d444c759dfda2c6fc605251;p=linux-2.6-omap-h63xx.git 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: Andrew Morton Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 8e02ecfec18..cec030e118d 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -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);