summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2010-07-14 22:29:21 +0200
committerRoland Dreier <rolandd@cisco.com>2010-07-14 22:29:21 +0200
commitea9f3bc6d1d8e2c56225e5be912d035b04740682 (patch)
treeed02e0e5ea405eef1605ae486371619be010606b /drivers/infiniband/hw
parentMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-ea9f3bc6d1d8e2c56225e5be912d035b04740682.tar.xz
linux-ea9f3bc6d1d8e2c56225e5be912d035b04740682.zip
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')
-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);
}