Commit c0328cc5 authored by Xingui Yang's avatar Xingui Yang Committed by Martin K. Petersen

scsi: hisi_sas: Fix warnings detected by sparse

This patch fixes the following warning:

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2168:43: sparse: sparse: restricted __le32 degrades to integer
Reported-by: default avatarkernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304161254.NztCVZIO-lkp@intel.com/Signed-off-by: default avatarXingui Yang <yangxingui@huawei.com>
Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Link: https://lore.kernel.org/r/1684118481-95908-4-git-send-email-chenxiang66@hisilicon.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a090fc97
...@@ -2216,6 +2216,7 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task, ...@@ -2216,6 +2216,7 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task,
u32 trans_tx_fail_type = le32_to_cpu(record->trans_tx_fail_type); u32 trans_tx_fail_type = le32_to_cpu(record->trans_tx_fail_type);
u16 sipc_rx_err_type = le16_to_cpu(record->sipc_rx_err_type); u16 sipc_rx_err_type = le16_to_cpu(record->sipc_rx_err_type);
u32 dw3 = le32_to_cpu(complete_hdr->dw3); u32 dw3 = le32_to_cpu(complete_hdr->dw3);
u32 dw0 = le32_to_cpu(complete_hdr->dw0);
switch (task->task_proto) { switch (task->task_proto) {
case SAS_PROTOCOL_SSP: case SAS_PROTOCOL_SSP:
...@@ -2225,8 +2226,8 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task, ...@@ -2225,8 +2226,8 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task,
* but I/O information has been written to the host memory, we examine * but I/O information has been written to the host memory, we examine
* response IU. * response IU.
*/ */
if (!(complete_hdr->dw0 & CMPLT_HDR_RSPNS_GOOD_MSK) && if (!(dw0 & CMPLT_HDR_RSPNS_GOOD_MSK) &&
(complete_hdr->dw0 & CMPLT_HDR_RSPNS_XFRD_MSK)) (dw0 & CMPLT_HDR_RSPNS_XFRD_MSK))
return false; return false;
ts->residual = trans_tx_fail_type; ts->residual = trans_tx_fail_type;
...@@ -2242,7 +2243,7 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task, ...@@ -2242,7 +2243,7 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task,
case SAS_PROTOCOL_SATA: case SAS_PROTOCOL_SATA:
case SAS_PROTOCOL_STP: case SAS_PROTOCOL_STP:
case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP: case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP:
if ((complete_hdr->dw0 & CMPLT_HDR_RSPNS_XFRD_MSK) && if ((dw0 & CMPLT_HDR_RSPNS_XFRD_MSK) &&
(sipc_rx_err_type & RX_FIS_STATUS_ERR_MSK)) { (sipc_rx_err_type & RX_FIS_STATUS_ERR_MSK)) {
ts->stat = SAS_PROTO_RESPONSE; ts->stat = SAS_PROTO_RESPONSE;
} else if (dma_rx_err_type & RX_DATA_LEN_UNDERFLOW_MSK) { } else if (dma_rx_err_type & RX_DATA_LEN_UNDERFLOW_MSK) {
......
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