* [PATCH] scsi: ufs: qcom: Drop dead compile guard
@ 2025-07-24 12:23 Konrad Dybcio
2025-07-24 14:19 ` Dmitry Baryshkov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Konrad Dybcio @ 2025-07-24 12:23 UTC (permalink / raw)
To: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
Dan Carpenter
Cc: Marijn Suijten, linux-arm-msm, linux-scsi, linux-kernel,
Konrad Dybcio
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
check.
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.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@oss.qualcomm.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: ufs: qcom: Drop dead compile guard
2025-07-24 12:23 [PATCH] scsi: ufs: qcom: Drop dead compile guard Konrad Dybcio
@ 2025-07-24 14:19 ` Dmitry Baryshkov
2025-07-25 1:12 ` Martin K. Petersen
2025-08-01 15:33 ` Dan Carpenter
2 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2025-07-24 14:19 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
Dan Carpenter, Marijn Suijten, linux-arm-msm, linux-scsi,
linux-kernel, Konrad Dybcio
On Thu, Jul 24, 2025 at 02:23:52PM +0200, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
> check.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.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(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: ufs: qcom: Drop dead compile guard
2025-07-24 12:23 [PATCH] scsi: ufs: qcom: Drop dead compile guard Konrad Dybcio
2025-07-24 14:19 ` Dmitry Baryshkov
@ 2025-07-25 1:12 ` Martin K. Petersen
2025-08-01 15:33 ` Dan Carpenter
2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2025-07-25 1:12 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
Dan Carpenter, Marijn Suijten, linux-arm-msm, linux-scsi,
linux-kernel, Konrad Dybcio
Konrad,
> SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
> check.
Applied to 6.17/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: ufs: qcom: Drop dead compile guard
2025-07-24 12:23 [PATCH] scsi: ufs: qcom: Drop dead compile guard Konrad Dybcio
2025-07-24 14:19 ` Dmitry Baryshkov
2025-07-25 1:12 ` Martin K. Petersen
@ 2025-08-01 15:33 ` Dan Carpenter
2025-08-05 4:45 ` Lukas Bulwahn
2 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2025-08-01 15:33 UTC (permalink / raw)
To: Konrad Dybcio, kernel-janitors, Lukas Bulwahn, Julia Lawall
Cc: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
Marijn Suijten, linux-arm-msm, linux-scsi, linux-kernel,
Konrad Dybcio
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@oss.qualcomm.com>
>
> SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
> check.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.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@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: ufs: qcom: Drop dead compile guard
2025-08-01 15:33 ` Dan Carpenter
@ 2025-08-05 4:45 ` Lukas Bulwahn
2025-08-05 7:04 ` Julia Lawall
0 siblings, 1 reply; 6+ messages in thread
From: Lukas Bulwahn @ 2025-08-05 4:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Konrad Dybcio, kernel-janitors, Julia Lawall,
Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
Marijn Suijten, linux-arm-msm, linux-scsi, linux-kernel,
Konrad Dybcio
On Fri, Aug 1, 2025 at 5:33 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> 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.
>
I also have a simple script to search for unused configs, but that is
just five lines of bash and then a lot of manual filtering.
If I would attempt to implement such already rather complex analysis,
I would start with looking at this tool:
https://github.com/paulgazz/kmax
Possibly, there is a good way to re-use some parts of it or extend it
to look for the pattern above.
Lukas
> regards,
> dan carpenter
>
> On Thu, Jul 24, 2025 at 02:23:52PM +0200, Konrad Dybcio wrote:
> > From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >
> > SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
> > check.
> >
> > Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.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@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: ufs: qcom: Drop dead compile guard
2025-08-05 4:45 ` Lukas Bulwahn
@ 2025-08-05 7:04 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2025-08-05 7:04 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Dan Carpenter, Konrad Dybcio, kernel-janitors,
Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
Marijn Suijten, linux-arm-msm, linux-scsi, linux-kernel,
Konrad Dybcio
[-- Attachment #1: Type: text/plain, Size: 2935 bytes --]
On Tue, 5 Aug 2025, Lukas Bulwahn wrote:
> On Fri, Aug 1, 2025 at 5:33 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > 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.
> >
>
> I also have a simple script to search for unused configs, but that is
> just five lines of bash and then a lot of manual filtering.
>
> If I would attempt to implement such already rather complex analysis,
> I would start with looking at this tool:
>
> https://github.com/paulgazz/kmax
>
> Possibly, there is a good way to re-use some parts of it or extend it
> to look for the pattern above.
If there are ideas for improvement of kmax, I'm sure Paul would be happy
to hear about them.
julia
>
> Lukas
>
> > regards,
> > dan carpenter
> >
> > On Thu, Jul 24, 2025 at 02:23:52PM +0200, Konrad Dybcio wrote:
> > > From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> > >
> > > SCSI_UFSHCD already selects DEVFREQ_GOV_SIMPLE_ONDEMAND, drop the
> > > check.
> > >
> > > Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.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@oss.qualcomm.com>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-08-05 7:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 12:23 [PATCH] scsi: ufs: qcom: Drop dead compile guard Konrad Dybcio
2025-07-24 14:19 ` Dmitry Baryshkov
2025-07-25 1:12 ` Martin K. Petersen
2025-08-01 15:33 ` Dan Carpenter
2025-08-05 4:45 ` Lukas Bulwahn
2025-08-05 7:04 ` Julia Lawall
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).