[PATCH v2 11/11] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe()
Sudeep Holla
sudeep.holla at arm.com
Wed Jul 19 08:32:40 PDT 2023
On Thu, Jul 13, 2023 at 04:17:38PM +0200, Ulf Hansson wrote:
> We have stubs for devm_of_clk_add_hw_provider(), so there should be no need
> to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean
> up the code a bit.
>
> Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
> ---
>
> Changes in v2:
> - New patch.
>
> ---
>
> drivers/cpufreq/scmi-cpufreq.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
> index b42f43d9bd89..ab967e520355 100644
> --- a/drivers/cpufreq/scmi-cpufreq.c
> +++ b/drivers/cpufreq/scmi-cpufreq.c
> @@ -326,11 +326,9 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)
> if (IS_ERR(perf_ops))
> return PTR_ERR(perf_ops);
>
> -#ifdef CONFIG_COMMON_CLK
I am not sure if it is no longer possible but at the time of addition of this
it was possible to build with CONFIG_COMMON_CLK=n and any error was reported[1]
I didn't want to add Kconfig dependency as this driver doesn't use any other
clock apis and this was added to meet some OPP(?) requirement IIRC. We can
drop the call to devm_of_clk_add_hw_provider if that is not the case. I need
to check it again as I can't recall all the details right now.
--
Regards,
Sudeep
[1] https://www.uwsg.indiana.edu/hypermail/linux/kernel/2012.0/04953.html
More information about the linux-arm-kernel
mailing list