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: <20221202073654.GB5356@thinkpad>
Date:   Fri, 2 Dec 2022 13:06:54 +0530
From:   Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To:     Andrew Halaney <ahalaney@...hat.com>
Cc:     andersson@...nel.org, agross@...nel.org, konrad.dybcio@...aro.org,
        jejb@...ux.ibm.com, martin.petersen@...cle.com,
        p.zabel@...gutronix.de, linux-arm-msm@...r.kernel.org,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] scsi: ufs: ufs-qcom: Drop unnecessary NULL checks

On Thu, Dec 01, 2022 at 05:08:07PM -0600, Andrew Halaney wrote:
> This code path is only called through one function, and the hba
> struct is already accessed in ufshcd_vops_dbg_register_dump() prior to
> calling so there is no way for it to be NULL.
> 
> Likewise, the print_fn callback is always supplied within this driver
> and is always provided.
> 
> Signed-off-by: Andrew Halaney <ahalaney@...hat.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>

Thanks,
Mani

> ---
>  drivers/ufs/host/ufs-qcom.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 8ad1415e10b6..70e25f9f8ca8 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1202,15 +1202,6 @@ static void ufs_qcom_print_hw_debug_reg_all(struct ufs_hba *hba,
>  	u32 reg;
>  	struct ufs_qcom_host *host;
>  
> -	if (unlikely(!hba)) {
> -		pr_err("%s: hba is NULL\n", __func__);
> -		return;
> -	}
> -	if (unlikely(!print_fn)) {
> -		dev_err(hba->dev, "%s: print_fn is NULL\n", __func__);
> -		return;
> -	}
> -
>  	host = ufshcd_get_variant(hba);
>  	if (!(host->dbg_print_en & UFS_QCOM_DBG_PRINT_REGS_EN))
>  		return;
> -- 
> 2.38.1
> 

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ