public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: cgel.zte@gmail.com, martin.petersen@oracle.com
Cc: james.smart@broadcom.com, dick.kennedy@broadcom.com,
	jejb@linux.ibm.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	ye xingchen <ye.xingchen@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] scsi: lpfc: Remove unneeded result variable
Date: Wed, 24 Aug 2022 07:14:39 -0700	[thread overview]
Message-ID: <be283e0b-211b-71eb-746e-7a221f01fbb0@gmail.com> (raw)
In-Reply-To: <20220824075123.221316-1-ye.xingchen@zte.com.cn>

On 8/24/2022 12:51 AM, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value from lpfc_issue_reg_vfi() 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_bsg.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
> index 9be3bb01a8ec..ac0c7ccf2eae 100644
> --- a/drivers/scsi/lpfc/lpfc_bsg.c
> +++ b/drivers/scsi/lpfc/lpfc_bsg.c
> @@ -1977,8 +1977,6 @@ lpfc_sli4_bsg_set_loopback_mode(struct lpfc_hba *phba, int mode,
>   static int
>   lpfc_sli4_diag_fcport_reg_setup(struct lpfc_hba *phba)
>   {
> -	int rc;
> -
>   	if (phba->pport->fc_flag & FC_VFI_REGISTERED) {
>   		lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
>   				"3136 Port still had vfi registered: "
> @@ -1988,8 +1986,7 @@ lpfc_sli4_diag_fcport_reg_setup(struct lpfc_hba *phba)
>   				phba->vpi_ids[phba->pport->vpi]);
>   		return -EINVAL;
>   	}
> -	rc = lpfc_issue_reg_vfi(phba->pport);
> -	return rc;
> +	return lpfc_issue_reg_vfi(phba->pport);
>   }
>   
>   /**

Thanks

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

-- james


  reply	other threads:[~2022-08-24 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  7:51 [PATCH linux-next] scsi: lpfc: Remove unneeded result variable cgel.zte
2022-08-24 14:14 ` James Smart [this message]
2022-09-01  4:39 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be283e0b-211b-71eb-746e-7a221f01fbb0@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=cgel.zte@gmail.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox