Commit bb1932db authored by Ye Bin's avatar Ye Bin Committed by Martin K. Petersen

scsi: sym53c8xx_2: Delete unnecessary else-if in sym_xerr_cam_status()

If (x_status & XE_PARITY_ERR) is true we set cam_status = DID_PARITY,
othervise cam_status always ends up being DID_ERROR. Delete superfluous
else-if statements.

Link: https://lore.kernel.org/r/20200902061646.576966-1-yebin10@huawei.comSigned-off-by: default avatarYe Bin <yebin10@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4b29cb61
......@@ -156,12 +156,8 @@ void sym_xpt_async_bus_reset(struct sym_hcb *np)
static int sym_xerr_cam_status(int cam_status, int x_status)
{
if (x_status) {
if (x_status & XE_PARITY_ERR)
if (x_status & XE_PARITY_ERR)
cam_status = DID_PARITY;
else if (x_status &(XE_EXTRA_DATA|XE_SODL_UNRUN|XE_SWIDE_OVRUN))
cam_status = DID_ERROR;
else if (x_status & XE_BAD_PHASE)
cam_status = DID_ERROR;
else
cam_status = DID_ERROR;
}
......
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