提交 bf640096 编写于 作者: H Harish Chegondi 提交者: Doug Ledford

IB/hfi1: Move constant to the right in bitwise operations

Implement changes recommended by the Coccinelle tool to move constant to
the right in bitwise operations

-bash-4.2$ make coccicheck MODE=report M=drivers/infiniband/hw/hfi1/

drivers/infiniband/hw/hfi1/pio.c:765:4-16: Move constant to right.
drivers/infiniband/hw/hfi1/rc.c:2503:19-29: Move constant to right.
drivers/infiniband/hw/hfi1/chip.c:9813:11-22: Move constant to right.
drivers/infiniband/hw/hfi1/chip.c:14468:29-40: Move constant to right.
Reviewed-by: NJubin John <jubin.john@intel.com>
Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 42d6ec19
...@@ -9810,7 +9810,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason) ...@@ -9810,7 +9810,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
if (do_transition) { if (do_transition) {
ret = set_physical_link_state(dd, ret = set_physical_link_state(dd,
PLS_OFFLINE | (rem_reason << 8)); (rem_reason << 8) | PLS_OFFLINE);
if (ret != HCMD_SUCCESS) { if (ret != HCMD_SUCCESS) {
dd_dev_err(dd, dd_dev_err(dd,
...@@ -14465,8 +14465,8 @@ static void handle_temp_err(struct hfi1_devdata *dd) ...@@ -14465,8 +14465,8 @@ static void handle_temp_err(struct hfi1_devdata *dd)
*/ */
ppd->driver_link_ready = 0; ppd->driver_link_ready = 0;
ppd->link_enabled = 0; ppd->link_enabled = 0;
set_physical_link_state(dd, PLS_OFFLINE | set_physical_link_state(dd, (OPA_LINKDOWN_REASON_SMA_DISABLED << 8) |
(OPA_LINKDOWN_REASON_SMA_DISABLED << 8)); PLS_OFFLINE);
/* /*
* Step 2: Shutdown LCB and 8051 * Step 2: Shutdown LCB and 8051
* After shutdown, do not restore DC_CFG_RESET value. * After shutdown, do not restore DC_CFG_RESET value.
......
...@@ -762,8 +762,8 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type, ...@@ -762,8 +762,8 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,
/* set the default partition key */ /* set the default partition key */
write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY),
(DEFAULT_PKEY & (SC(CHECK_PARTITION_KEY_VALUE_MASK) &
SC(CHECK_PARTITION_KEY_VALUE_MASK)) << DEFAULT_PKEY) <<
SC(CHECK_PARTITION_KEY_VALUE_SHIFT)); SC(CHECK_PARTITION_KEY_VALUE_SHIFT));
/* per context type checks */ /* per context type checks */
......
...@@ -2500,7 +2500,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet) ...@@ -2500,7 +2500,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
return; return;
rnr_nak: rnr_nak:
qp->r_nak_state = IB_RNR_NAK | qp->r_min_rnr_timer; qp->r_nak_state = qp->r_min_rnr_timer | IB_RNR_NAK;
qp->r_ack_psn = qp->r_psn; qp->r_ack_psn = qp->r_psn;
/* Queue RNR NAK for later */ /* Queue RNR NAK for later */
rc_defered_ack(rcd, qp); rc_defered_ack(rcd, qp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册