Re: [PATCH v1] cpufreq: CPPC: Fix unused-function warning

From: Viresh Kumar
Date: Mon May 30 2022 - 05:46:56 EST


On 30-05-22, 11:42, Pierre Gondois wrote:
> Ok yes. Just to be sure and except if disagreed, I will use the
> following structure:
> #if CONFIG_ARM64
> #else
> #endif
>
> #if defined(CONFIG_ARM64) && defined(CONFIG_ENERGY_MODEL)
> int populate_efficiency_class();
> #else
> int populate_efficiency_class();
> #endif
>
> to avoid having multiple empty definitions of
> populate_efficiency_class() (for eg.) that we would have with:
> #if CONFIG_ARM64
> #if CONFIG_ENERGY_MODEL
> int populate_efficiency_class();
> #else // CONFIG_ENERGY_MODEL
> int populate_efficiency_class();
> #endif // CONFIG_ENERGY_MODEL
> #else // CONFIG_ARM64
> int populate_efficiency_class();
> #endif // CONFIG_ARM64

Look good.

--
viresh