linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable
@ 2022-08-24  7:50 cgel.zte
  2022-08-24 14:14 ` James Smart
  2022-09-01  4:39 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-08-24  7:50 UTC (permalink / raw)
  To: martin.petersen
  Cc: james.smart, dick.kennedy, jejb, linux-scsi, linux-kernel,
	ye xingchen, Zeal Robot

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
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable
  2022-08-24  7:50 [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable cgel.zte
@ 2022-08-24 14:14 ` James Smart
  2022-09-01  4:39 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: James Smart @ 2022-08-24 14:14 UTC (permalink / raw)
  To: cgel.zte, martin.petersen
  Cc: james.smart, dick.kennedy, jejb, linux-scsi, linux-kernel,
	ye xingchen, Zeal Robot

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable
  2022-08-24  7:50 [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable cgel.zte
  2022-08-24 14:14 ` James Smart
@ 2022-09-01  4:39 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-09-01  4:39 UTC (permalink / raw)
  To: cgel.zte
  Cc: martin.petersen, james.smart, dick.kennedy, jejb, linux-scsi,
	linux-kernel, ye xingchen, Zeal Robot


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

Applied to 6.1/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-01  4:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  7:50 [PATCH linux-next] scsi: lpfc: Remove the unneeded result variable cgel.zte
2022-08-24 14:14 ` James Smart
2022-09-01  4:39 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).