mbox series

[0/4] cpufreq: Make cpufreq_driver->exit() return void

Message ID cover.1720075640.git.viresh.kumar@linaro.org
Headers show
Series cpufreq: Make cpufreq_driver->exit() return void | expand

Message

Viresh Kumar July 4, 2024, 6:53 a.m. UTC
Make exit() return void, since it isn't used by the core.

Based on initial patches sent by Lizhe [1].

Rafael, I will take this through my tree for 6.11.

--
Viresh

[1] https://lore.kernel.org/all/20240410132132.3526-1-sensor1010@163.com/

Lizhe (1):
  cpufreq: Make cpufreq_driver->exit() return void

Viresh Kumar (3):
  cpufreq: nforce2: Remove empty exit() callback
  cpufreq: loongson2: Remove empty exit() callback
  cpufreq: pcc: Remove empty exit() callback

 drivers/cpufreq/acpi-cpufreq.c         |  4 +---
 drivers/cpufreq/amd-pstate.c           |  7 ++-----
 drivers/cpufreq/apple-soc-cpufreq.c    |  4 +---
 drivers/cpufreq/bmips-cpufreq.c        |  4 +---
 drivers/cpufreq/cppc_cpufreq.c         |  3 +--
 drivers/cpufreq/cpufreq-dt.c           |  3 +--
 drivers/cpufreq/cpufreq-nforce2.c      |  6 ------
 drivers/cpufreq/e_powersaver.c         |  3 +--
 drivers/cpufreq/intel_pstate.c         |  8 +++-----
 drivers/cpufreq/loongson2_cpufreq.c    |  6 ------
 drivers/cpufreq/mediatek-cpufreq-hw.c  |  4 +---
 drivers/cpufreq/mediatek-cpufreq.c     |  4 +---
 drivers/cpufreq/omap-cpufreq.c         |  3 +--
 drivers/cpufreq/pasemi-cpufreq.c       |  6 ++----
 drivers/cpufreq/pcc-cpufreq.c          |  6 ------
 drivers/cpufreq/powernow-k6.c          |  5 ++---
 drivers/cpufreq/powernow-k7.c          |  3 +--
 drivers/cpufreq/powernow-k8.c          |  6 ++----
 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   | 10 +++-------
 drivers/cpufreq/tegra194-cpufreq.c     |  4 +---
 drivers/cpufreq/vexpress-spc-cpufreq.c |  5 ++---
 include/linux/cpufreq.h                |  2 +-
 31 files changed, 37 insertions(+), 102 deletions(-)

Comments

AngeloGioacchino Del Regno July 4, 2024, 8:27 a.m. UTC | #1
Il 04/07/24 08:53, Viresh Kumar ha scritto:
> From: Lizhe <sensor1010@163.com>
> 
> The cpufreq core doesn't check the return type of the exit() callback
> and there is not much the core can do on failures at that point. Just
> drop the returned value and make it return void.
> 
> Signed-off-by: Lizhe <sensor1010@163.com>
> [ Viresh: Reworked the patches to fix all missing changes together. ]
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

For MediaTek:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Sudeep Holla July 4, 2024, 9:26 a.m. UTC | #2
On Thu, Jul 04, 2024 at 12:23:55PM +0530, Viresh Kumar wrote:
> From: Lizhe <sensor1010@163.com>
> 
> The cpufreq core doesn't check the return type of the exit() callback
> and there is not much the core can do on failures at that point. Just
> drop the returned value and make it return void.
> 
> Signed-off-by: Lizhe <sensor1010@163.com>
> [ Viresh: Reworked the patches to fix all missing changes together. ]
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---

[...]

>  drivers/cpufreq/scmi-cpufreq.c         |  4 +---
>  drivers/cpufreq/scpi-cpufreq.c         |  4 +---
>  drivers/cpufreq/vexpress-spc-cpufreq.c |  5 ++---

(For the above 3 files)
Acked-by: Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep
Mario Limonciello July 4, 2024, 11:56 a.m. UTC | #3
On 7/4/2024 1:53, Viresh Kumar wrote:
> From: Lizhe <sensor1010@163.com>
> 
> The cpufreq core doesn't check the return type of the exit() callback
> and there is not much the core can do on failures at that point. Just
> drop the returned value and make it return void.
> 
> Signed-off-by: Lizhe <sensor1010@163.com>
> [ Viresh: Reworked the patches to fix all missing changes together. ]
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>   drivers/cpufreq/acpi-cpufreq.c         |  4 +---
>   drivers/cpufreq/amd-pstate.c           |  7 ++-----
>   drivers/cpufreq/apple-soc-cpufreq.c    |  4 +---
>   drivers/cpufreq/bmips-cpufreq.c        |  4 +---
>   drivers/cpufreq/cppc_cpufreq.c         |  3 +--
>   drivers/cpufreq/cpufreq-dt.c           |  3 +--
>   drivers/cpufreq/e_powersaver.c         |  3 +--
>   drivers/cpufreq/intel_pstate.c         |  8 +++-----
>   drivers/cpufreq/mediatek-cpufreq-hw.c  |  4 +---
>   drivers/cpufreq/mediatek-cpufreq.c     |  4 +---
>   drivers/cpufreq/omap-cpufreq.c         |  3 +--
>   drivers/cpufreq/pasemi-cpufreq.c       |  6 ++----
>   drivers/cpufreq/powernow-k6.c          |  5 ++---
>   drivers/cpufreq/powernow-k7.c          |  3 +--
>   drivers/cpufreq/powernow-k8.c          |  6 ++----
>   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   | 10 +++-------
>   drivers/cpufreq/tegra194-cpufreq.c     |  4 +---
>   drivers/cpufreq/vexpress-spc-cpufreq.c |  5 ++---
>   include/linux/cpufreq.h                |  2 +-
>   28 files changed, 37 insertions(+), 84 deletions(-)

Acked-by: Mario Limonciello <mario.limonciello@amd.com> # 
drivers/cpufreq/amd-pstate.c
Rafael J. Wysocki July 4, 2024, 12:02 p.m. UTC | #4
On Thu, Jul 4, 2024 at 8:54 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> Make exit() return void, since it isn't used by the core.
>
> Based on initial patches sent by Lizhe [1].
>
> Rafael, I will take this through my tree for 6.11.

Sure.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

for the series.

Thanks!

> --
> Viresh
>
> [1] https://lore.kernel.org/all/20240410132132.3526-1-sensor1010@163.com/
>
> Lizhe (1):
>   cpufreq: Make cpufreq_driver->exit() return void
>
> Viresh Kumar (3):
>   cpufreq: nforce2: Remove empty exit() callback
>   cpufreq: loongson2: Remove empty exit() callback
>   cpufreq: pcc: Remove empty exit() callback
>
>  drivers/cpufreq/acpi-cpufreq.c         |  4 +---
>  drivers/cpufreq/amd-pstate.c           |  7 ++-----
>  drivers/cpufreq/apple-soc-cpufreq.c    |  4 +---
>  drivers/cpufreq/bmips-cpufreq.c        |  4 +---
>  drivers/cpufreq/cppc_cpufreq.c         |  3 +--
>  drivers/cpufreq/cpufreq-dt.c           |  3 +--
>  drivers/cpufreq/cpufreq-nforce2.c      |  6 ------
>  drivers/cpufreq/e_powersaver.c         |  3 +--
>  drivers/cpufreq/intel_pstate.c         |  8 +++-----
>  drivers/cpufreq/loongson2_cpufreq.c    |  6 ------
>  drivers/cpufreq/mediatek-cpufreq-hw.c  |  4 +---
>  drivers/cpufreq/mediatek-cpufreq.c     |  4 +---
>  drivers/cpufreq/omap-cpufreq.c         |  3 +--
>  drivers/cpufreq/pasemi-cpufreq.c       |  6 ++----
>  drivers/cpufreq/pcc-cpufreq.c          |  6 ------
>  drivers/cpufreq/powernow-k6.c          |  5 ++---
>  drivers/cpufreq/powernow-k7.c          |  3 +--
>  drivers/cpufreq/powernow-k8.c          |  6 ++----
>  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   | 10 +++-------
>  drivers/cpufreq/tegra194-cpufreq.c     |  4 +---
>  drivers/cpufreq/vexpress-spc-cpufreq.c |  5 ++---
>  include/linux/cpufreq.h                |  2 +-
>  31 files changed, 37 insertions(+), 102 deletions(-)
>
> --
> 2.31.1.272.g89b43f80a514
>
>