scsi: libsas: Correctly indent statements in sas_to_ata_err()
checkpatch reported an error in sas_to_ata_err(). switch and case statements are incorrectly indented. Link: https://lore.kernel.org/r/1616675396-6108-2-git-send-email-luojiaxing@huawei.com Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
a1e9981ba5
commit
c03f2422b9
@ -35,46 +35,40 @@ static enum ata_completion_errors sas_to_ata_err(struct task_status_struct *ts)
|
||||
/* ts->resp == SAS_TASK_COMPLETE */
|
||||
/* task delivered, what happened afterwards? */
|
||||
switch (ts->stat) {
|
||||
case SAS_DEV_NO_RESPONSE:
|
||||
return AC_ERR_TIMEOUT;
|
||||
|
||||
case SAS_INTERRUPTED:
|
||||
case SAS_PHY_DOWN:
|
||||
case SAS_NAK_R_ERR:
|
||||
return AC_ERR_ATA_BUS;
|
||||
|
||||
|
||||
case SAS_DATA_UNDERRUN:
|
||||
/*
|
||||
* Some programs that use the taskfile interface
|
||||
* (smartctl in particular) can cause underrun
|
||||
* problems. Ignore these errors, perhaps at our
|
||||
* peril.
|
||||
*/
|
||||
return 0;
|
||||
|
||||
case SAS_DATA_OVERRUN:
|
||||
case SAS_QUEUE_FULL:
|
||||
case SAS_DEVICE_UNKNOWN:
|
||||
case SAS_SG_ERR:
|
||||
return AC_ERR_INVALID;
|
||||
|
||||
case SAS_OPEN_TO:
|
||||
case SAS_OPEN_REJECT:
|
||||
pr_warn("%s: Saw error %d. What to do?\n",
|
||||
__func__, ts->stat);
|
||||
return AC_ERR_OTHER;
|
||||
|
||||
case SAM_STAT_CHECK_CONDITION:
|
||||
case SAS_ABORTED_TASK:
|
||||
return AC_ERR_DEV;
|
||||
|
||||
case SAS_PROTO_RESPONSE:
|
||||
/* This means the ending_fis has the error
|
||||
* value; return 0 here to collect it */
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
case SAS_DEV_NO_RESPONSE:
|
||||
return AC_ERR_TIMEOUT;
|
||||
case SAS_INTERRUPTED:
|
||||
case SAS_PHY_DOWN:
|
||||
case SAS_NAK_R_ERR:
|
||||
return AC_ERR_ATA_BUS;
|
||||
case SAS_DATA_UNDERRUN:
|
||||
/*
|
||||
* Some programs that use the taskfile interface
|
||||
* (smartctl in particular) can cause underrun
|
||||
* problems. Ignore these errors, perhaps at our
|
||||
* peril.
|
||||
*/
|
||||
return 0;
|
||||
case SAS_DATA_OVERRUN:
|
||||
case SAS_QUEUE_FULL:
|
||||
case SAS_DEVICE_UNKNOWN:
|
||||
case SAS_SG_ERR:
|
||||
return AC_ERR_INVALID;
|
||||
case SAS_OPEN_TO:
|
||||
case SAS_OPEN_REJECT:
|
||||
pr_warn("%s: Saw error %d. What to do?\n",
|
||||
__func__, ts->stat);
|
||||
return AC_ERR_OTHER;
|
||||
case SAM_STAT_CHECK_CONDITION:
|
||||
case SAS_ABORTED_TASK:
|
||||
return AC_ERR_DEV;
|
||||
case SAS_PROTO_RESPONSE:
|
||||
/* This means the ending_fis has the error
|
||||
* value; return 0 here to collect it
|
||||
*/
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user