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)
---
I'll queue this for 2.6.36 unless someone objects.
drivers/infiniband/hw/nes/nes_hw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/hw/nes/nes_hw.c +1 -1
@@ -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 ); }
Signature · 10 lines
1.7.1.1 -- Roland Dreier <[email protected]> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines
-----Original Message-----
From: Roland Dreier [mailto:[email protected]]
Sent: Wednesday, July 14, 2010 3:31 PM
To: Latif, Faisal; Tung, Chien Tin; [email protected]
Subject: [PATCH/RFC] RDMA/nes: Rewrite expression to avoid undefined semanticsChange code like
x = expr(++x)
Quoted 8 lines
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 <[email protected]>---
I'll queue this for 2.6.36 unless someone objects.
This is fine.
Thanks
Faisal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html