Skip to content

Commit 5cffc67

Browse files
qianfengrongmartinkpetersen
authored andcommitted
scsi: lpfc: Use int type to store negative error codes
Change the 'ret' variable in lpfc_sli4_issue_wqe() from uint32_t to int, as it needs to store either negative error codes or zero returned by lpfc_sli4_wq_put(). Storing the negative error codes in unsigned type, doesn't cause an issue at runtime but can be confusing. Additionally, assigning negative error codes to unsigned type may trigger a GCC warning when the -Wsign-conversion flag is enabled. No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent b0aca7a commit 5cffc67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21373,7 +21373,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp,
2137321373
struct lpfc_sglq *sglq;
2137421374
struct lpfc_sli_ring *pring;
2137521375
unsigned long iflags;
21376-
uint32_t ret = 0;
21376+
int ret = 0;
2137721377

2137821378
/* NVME_LS and NVME_LS ABTS requests. */
2137921379
if (pwqe->cmd_flag & LPFC_IO_NVME_LS) {

0 commit comments

Comments
 (0)