Commit 5163dc1a authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Roland Dreier

IB/mthca: Convert to use be16_add_cpu()

replace:

	big_endian_variable = cpu_to_beX(beX_to_cpu(big_endian_variable) +
						expression_in_cpu_byteorder);

with:

	beX_add_cpu(&big_endian_variable, expression_in_cpu_byteorder);

Generated with a semantic patch.
Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 8704e9a8
...@@ -473,7 +473,7 @@ static void handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq, ...@@ -473,7 +473,7 @@ static void handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
if (!(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd)) if (!(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd))
return; return;
cqe->db_cnt = cpu_to_be16(be16_to_cpu(cqe->db_cnt) - dbd); be16_add_cpu(&cqe->db_cnt, -dbd);
cqe->wqe = new_wqe; cqe->wqe = new_wqe;
cqe->syndrome = SYNDROME_WR_FLUSH_ERR; cqe->syndrome = SYNDROME_WR_FLUSH_ERR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment