Re: [PATCH v2 1/2] cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro in a stub

From: Viresh Kumar
Date: Mon Jun 24 2019 - 09:59:37 EST


On 24-06-19, 15:17, Daniel Lezcano wrote:
> The cpufreq_online and the cpufreq_offline [un]register the driver as
> a cooling device. This is done if the driver is flagged as a cooling
> device in addition with a IS_ENABLED macro to compile out the branching
> code.
>
> Group this test in a stub function added in the cpufreq header instead
> of having the IS_ENABLED in the code path.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> ---
> drivers/cpufreq/cpufreq.c | 6 ++----
> include/linux/cpufreq.h | 5 +++++
> 2 files changed, 7 insertions(+), 4 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>

--
viresh