Re: [PATCH 1/5] cpuidle: Remove pointless stub
From: Rafael J. Wysocki
Date: Fri Oct 16 2020 - 11:24:20 EST
On Thu, Oct 15, 2020 at 4:44 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
>
> The cpuidle.h header is declaring functions with an empty stub when
> cpuidle is not enabled. However these functions are only called from
> the governors which depends on cpuidle. In other words, when the
> function is called it is when cpuidle is enabled, there is no
> situation when it is called with cpuidle disabled.
>
> Remove the pointless stub.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> ---
> include/linux/cpuidle.h | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
> index 6175c77bf25e..74fdcc6106b1 100644
> --- a/include/linux/cpuidle.h
> +++ b/include/linux/cpuidle.h
> @@ -270,13 +270,8 @@ struct cpuidle_governor {
> void (*reflect) (struct cpuidle_device *dev, int index);
> };
>
> -#ifdef CONFIG_CPU_IDLE
> extern int cpuidle_register_governor(struct cpuidle_governor *gov);
> extern s64 cpuidle_governor_latency_req(unsigned int cpu);
> -#else
> -static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
> -{return 0;}
> -#endif
>
> #define __CPU_PM_CPU_IDLE_ENTER(low_level_idle_enter, \
> idx, \
> --
Applied (this patch alone) as 5.10-rc material with some minor edits
in the changelog, thanks!