diff options
author | Roland Dreier <rolandd@cisco.com> | 2010-07-14 22:29:21 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-14 22:29:21 +0200 |
commit | ea9f3bc6d1d8e2c56225e5be912d035b04740682 (patch) | |
tree | ed02e0e5ea405eef1605ae486371619be010606b | |
parent | Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-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>
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 2 |
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); } |