scsi: zfcp: proper indentation to reduce confusion in zfcp_erp_required_act
No functional change. The unary not operator only applies to the sub expression before the logical or. So we return early if (not running) or failed. Link: https://lore.kernel.org/r/df4f897f6e83eaa528465d0858d5a22daac47a2f.1572018132.git.bblock@linux.ibm.com Reviewed-by: Jens Remus <jremus@linux.ibm.com> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
48910f8c35
commit
e76acc5194
|
@ -174,7 +174,7 @@ static enum zfcp_erp_act_type zfcp_erp_required_act(enum zfcp_erp_act_type want,
|
||||||
return 0;
|
return 0;
|
||||||
p_status = atomic_read(&port->status);
|
p_status = atomic_read(&port->status);
|
||||||
if (!(p_status & ZFCP_STATUS_COMMON_RUNNING) ||
|
if (!(p_status & ZFCP_STATUS_COMMON_RUNNING) ||
|
||||||
p_status & ZFCP_STATUS_COMMON_ERP_FAILED)
|
p_status & ZFCP_STATUS_COMMON_ERP_FAILED)
|
||||||
return 0;
|
return 0;
|
||||||
if (!(p_status & ZFCP_STATUS_COMMON_UNBLOCKED))
|
if (!(p_status & ZFCP_STATUS_COMMON_UNBLOCKED))
|
||||||
need = ZFCP_ERP_ACTION_REOPEN_PORT;
|
need = ZFCP_ERP_ACTION_REOPEN_PORT;
|
||||||
|
@ -190,7 +190,7 @@ static enum zfcp_erp_act_type zfcp_erp_required_act(enum zfcp_erp_act_type want,
|
||||||
return 0;
|
return 0;
|
||||||
a_status = atomic_read(&adapter->status);
|
a_status = atomic_read(&adapter->status);
|
||||||
if (!(a_status & ZFCP_STATUS_COMMON_RUNNING) ||
|
if (!(a_status & ZFCP_STATUS_COMMON_RUNNING) ||
|
||||||
a_status & ZFCP_STATUS_COMMON_ERP_FAILED)
|
a_status & ZFCP_STATUS_COMMON_ERP_FAILED)
|
||||||
return 0;
|
return 0;
|
||||||
if (p_status & ZFCP_STATUS_COMMON_NOESC)
|
if (p_status & ZFCP_STATUS_COMMON_NOESC)
|
||||||
return need;
|
return need;
|
||||||
|
|
Loading…
Reference in New Issue