lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be283e0b-211b-71eb-746e-7a221f01fbb0@gmail.com>
Date:   Wed, 24 Aug 2022 07:14:39 -0700
From:   James Smart <jsmart2021@...il.com>
To:     cgel.zte@...il.com, martin.petersen@...cle.com
Cc:     james.smart@...adcom.com, dick.kennedy@...adcom.com,
        jejb@...ux.ibm.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] scsi: lpfc: Remove unneeded result variable

On 8/24/2022 12:51 AM, cgel.zte@...il.com wrote:
> From: ye xingchen <ye.xingchen@....com.cn>
> 
> Return the value from lpfc_issue_reg_vfi() directly instead of storing it
>   in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....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@...il.com>

-- james

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ