Commit 59ec8736 authored by Jan Sokolowski's avatar Jan Sokolowski Committed by Doug Ledford

IB/hfi1: Fix code consistency for if/else blocks in chip.c

Code structure is not consistent for if/else blocks and break
instructions in set_link_state for case HLS_UP_INIT. Physical
state uses break in case of an error and if/else blocks for
logical use cases. These blocks should be implemented consistently.
Reviewed-by: default avatarJakub Byczkowski <jakub.byczkowski@intel.com>
Signed-off-by: default avatarJan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent bf90aadd
...@@ -10569,7 +10569,9 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) ...@@ -10569,7 +10569,9 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
dd_dev_err(dd, dd_dev_err(dd,
"%s: logical state did not change to INIT\n", "%s: logical state did not change to INIT\n",
__func__); __func__);
} else { break;
}
/* clear old transient LINKINIT_REASON code */ /* clear old transient LINKINIT_REASON code */
if (ppd->linkinit_reason >= OPA_LINKINIT_REASON_CLEAR) if (ppd->linkinit_reason >= OPA_LINKINIT_REASON_CLEAR)
ppd->linkinit_reason = ppd->linkinit_reason =
...@@ -10580,7 +10582,6 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state) ...@@ -10580,7 +10582,6 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
handle_linkup_change(dd, 1); handle_linkup_change(dd, 1);
ppd->host_link_state = HLS_UP_INIT; ppd->host_link_state = HLS_UP_INIT;
}
break; break;
case HLS_UP_ARMED: case HLS_UP_ARMED:
if (ppd->host_link_state != HLS_UP_INIT) if (ppd->host_link_state != HLS_UP_INIT)
......
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