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] [day] [month] [year] [list]
Message-ID: <d7093377-a34e-4488-97c6-3d2ffcd13620@suswa.mountain>
Date: Fri, 1 Aug 2025 18:33:05 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Konrad Dybcio <konradybcio@...nel.org>, kernel-janitors@...r.kernel.org,
	Lukas Bulwahn <lukas.bulwahn@...il.com>,
	Julia Lawall <julia.lawall@...6.fr>
Cc: Manivannan Sadhasivam <mani@...nel.org>,
	"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Marijn Suijten <marijn.suijten@...ainline.org>,
	linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: Re: [PATCH] scsi: ufs: qcom: Drop dead compile guard

This patch removes some dead ifdeffed code because the KConfig has a
select which ensures that CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is set.
Konrad was wondering if there are any tools to detect this sort of
thing.  I don't think so.  I think the only thing we detect are
non-existant configs.  But let me add a few more people to the CC who
might know.

regards,
dan carpenter

On Thu, Jul 24, 2025 at 02:23:52PM +0200, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> 
> SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
> check.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> ---
> Is this something that could be discovered by our existing static
> checkers?
> ---
>  drivers/ufs/host/ufs-qcom.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 4bbe4de1679b908c85e6a3d4035fc9dcafcc0d1a..76fc70503a62eb2e747b2d4cd18cc05b6f5526c7 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1898,7 +1898,6 @@ static int ufs_qcom_device_reset(struct ufs_hba *hba)
>  	return 0;
>  }
>  
> -#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
>  static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
>  					struct devfreq_dev_profile *p,
>  					struct devfreq_simple_ondemand_data *d)
> @@ -1910,13 +1909,6 @@ static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
>  
>  	hba->clk_scaling.suspend_on_no_request = true;
>  }
> -#else
> -static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
> -		struct devfreq_dev_profile *p,
> -		struct devfreq_simple_ondemand_data *data)
> -{
> -}
> -#endif
>  
>  /* Resources */
>  static const struct ufshcd_res_info ufs_res_info[RES_MAX] = {
> 
> ---
> base-commit: a933d3dc1968fcfb0ab72879ec304b1971ed1b9a
> change-id: 20250724-topic-ufs_compile_check-3378996f4221
> 
> Best regards,
> -- 
> Konrad Dybcio <konrad.dybcio@....qualcomm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ