[PATCH] cpufreq: Convert to exit callback returning void

Christophe Leroy christophe.leroy at csgroup.eu
Tue Apr 9 08:05:14 PDT 2024



Le 09/04/2024 à 16:53, Lizhe a écrit :
> For the exit() callback function returning an int type value,
> this leads many driver authors mistakenly believing that error
> handling can be performed by returning an error code. However,
> the returned value is ignored, and to improve this situation,
> it is proposed to modify the return type of the exit() callback
> function to void.
> 
> Signed-off-by: Lizhe <sensor1010 at 163.com>
> ---
>   drivers/cpufreq/pasemi-cpufreq.c       | 4 +---
>   drivers/cpufreq/powernv-cpufreq.c      | 4 +---
>   drivers/cpufreq/ppc_cbe_cpufreq.c      | 3 +--
>   drivers/cpufreq/qcom-cpufreq-hw.c      | 4 +---
>   drivers/cpufreq/qoriq-cpufreq.c        | 4 +---
>   drivers/cpufreq/scmi-cpufreq.c         | 4 +---
>   drivers/cpufreq/scpi-cpufreq.c         | 4 +---
>   drivers/cpufreq/sh-cpufreq.c           | 4 +---
>   drivers/cpufreq/sparc-us2e-cpufreq.c   | 3 +--
>   drivers/cpufreq/sparc-us3-cpufreq.c    | 3 +--
>   drivers/cpufreq/speedstep-centrino.c   | 4 +---
>   drivers/cpufreq/tegra194-cpufreq.c     | 4 +---
>   drivers/cpufreq/vexpress-spc-cpufreq.c | 3 +--
>   13 files changed, 13 insertions(+), 35 deletions(-)

Did you do a building test ?

How can this work without changing the definition of exit in struct 
cpu_freq driver in include/linux/cpufreq.h ?

Christophe


More information about the linux-arm-kernel mailing list