summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes/nes_hw.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2010-07-14 13:29:21 -0700
committerRoland Dreier <rolandd@cisco.com>2010-07-14 13:29:21 -0700
commitea9f3bc6d1d8e2c56225e5be912d035b04740682 (patch)
treeed02e0e5ea405eef1605ae486371619be010606b /drivers/infiniband/hw/nes/nes_hw.c
parent589643be6693c46fbc54bae77745f336c8ed4bcc (diff)
RDMA/nes: Rewrite expression to avoid undefined semantics
Change code like x = expr(++x) that assigns to x twice without a sequence point in between to the intended (and well-defined) x = expr(x + 1) Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_hw.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 57874a165083..f41d890956a1 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -1970,7 +1970,7 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic)
dev_kfree_skb(
nesvnic->nic.tx_skb[nesvnic->nic.sq_tail]);
- nesvnic->nic.sq_tail = (++nesvnic->nic.sq_tail)
+ nesvnic->nic.sq_tail = (nesvnic->nic.sq_tail + 1)
& (nesvnic->nic.sq_size - 1);
}