diff mbox series

[linux-next] scsi: lpfc: Remove the unneeded result variable

Message ID 20220824075017.221244-1-ye.xingchen@zte.com.cn (mailing list archive)
State Accepted
Headers show
Series [linux-next] scsi: lpfc: Remove the unneeded result variable | expand

Commit Message

CGEL Aug. 24, 2022, 7:50 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value from lpfc_sli4_issue_wqe() directly instead of storing it
 in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/scsi/lpfc/lpfc_sli.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

James Smart Aug. 24, 2022, 2:14 p.m. UTC | #1
On 8/24/2022 12:50 AM, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value from lpfc_sli4_issue_wqe() directly instead of storing it
>   in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>   drivers/scsi/lpfc/lpfc_sli.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 608016725db9..1298cea81396 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -10322,12 +10322,10 @@ static int
>   __lpfc_sli_issue_fcp_io_s4(struct lpfc_hba *phba, uint32_t ring_number,
>   			   struct lpfc_iocbq *piocb, uint32_t flag)
>   {
> -	int rc;
>   	struct lpfc_io_buf *lpfc_cmd = piocb->io_buf;
>   
>   	lpfc_prep_embed_io(phba, lpfc_cmd);
> -	rc = lpfc_sli4_issue_wqe(phba, lpfc_cmd->hdwq, piocb);
> -	return rc;
> +	return lpfc_sli4_issue_wqe(phba, lpfc_cmd->hdwq, piocb);
>   }
>   
>   void

Thanks

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james
Martin K. Petersen Sept. 1, 2022, 4:39 a.m. UTC | #2
> Return the value from lpfc_sli4_issue_wqe() directly instead of
> storing it in another redundant variable.

Applied to 6.1/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 608016725db9..1298cea81396 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -10322,12 +10322,10 @@  static int
 __lpfc_sli_issue_fcp_io_s4(struct lpfc_hba *phba, uint32_t ring_number,
 			   struct lpfc_iocbq *piocb, uint32_t flag)
 {
-	int rc;
 	struct lpfc_io_buf *lpfc_cmd = piocb->io_buf;
 
 	lpfc_prep_embed_io(phba, lpfc_cmd);
-	rc = lpfc_sli4_issue_wqe(phba, lpfc_cmd->hdwq, piocb);
-	return rc;
+	return lpfc_sli4_issue_wqe(phba, lpfc_cmd->hdwq, piocb);
 }
 
 void