imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/12] cpufreq: use __free() for all cpufreq_cpu_get() references
@ 2025-09-01  8:57 Zihuan Zhang
  2025-09-01  8:57 ` [PATCH v3 01/12] arm64: topology: Use scope-based cleanup helper Zihuan Zhang
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Zihuan Zhang @ 2025-09-01  8:57 UTC (permalink / raw)
  To: Rafael J . wysocki, Viresh Kumar, Catalin Marinas, Will Deacon,
	Borislav Petkov, Dave Hansen, Srinivas Pandruvada,
	Michael Ellerman, Krzysztof Kozlowski, Alim Akhtar,
	Thierry Reding, MyungJoo Ham, Kyungmin Park, Chanwoo Choi,
	Jani Nikula, Rodrigo Vivi, Tvrtko Ursulin, David Airlie,
	Simona Vetter, Daniel Lezcano, Sascha Hauer, Shawn Guo,
	Eduardo Valentin, Keerthy
  Cc: Ben Horgan, zhenglifeng, Zhang Rui, Len Brown, Lukasz Luba,
	Pengutronix Kernel Team, Beata Michalska, Fabio Estevam,
	Pavel Machek, Sumit Gupta, Prasanna Kumar T S M, Sudeep Holla,
	Yicong Yang, linux-pm, linux-acpi, linuxppc-dev, linux-arm-kernel,
	intel-gfx, dri-devel, imx, linux-omap, linux-kernel, Zihuan Zhang

This patchset converts all remaining cpufreq users to rely on the
__free(put_cpufreq_policy) annotation for policy references, instead of
calling cpufreq_cpu_put() manually.

Motivation:
- Reduce the chance of reference counting mistakes
- Make the code more consistent with the latest kernel style
- behavior remains the same, but reference counting is now safer 
  and easier to maintain.

The changes are split into 12 patches as they touch different subsystems
and are maintained by different people. There is no functional change.

V3:
 - drop patch 'KVM: x86: Use __free(put_cpufreq_policy) for policy reference'
 - removed 5 patches which has been applied
 - Consolidate CPUFreq policy assignments and allocations into one line,
   suggested by Ben Horgan
 - Change cpu_has_cpufreq() return type to bool, following Rafael's suggestion
 - Change the title to 'Use scope-based cleanup helper'

V2:
 - Fix compile error in powernv-cpufreq.c
 - Split patch to separate logical changes

Zihuan Zhang (12):
  arm64: topology: Use scope-based cleanup helper
  ACPI: processor: thermal: Use scope-based cleanup helper
  cpufreq: intel_pstate: Use scope-based cleanup helper
  cpufreq: longhaul: Use scope-based cleanup helper
  cpufreq: powernv: Use scope-based cleanup helper
  PM / devfreq: Use scope-based cleanup helper
  drm/i915: Use scope-based cleanup helper
  cpufreq: powerpc: macintosh: Use scope-based cleanup helper
  powercap: dtpm_cpu: Use scope-based cleanup helper
  thermal: imx: Use scope-based cleanup helper
  thermal/drivers/ti-soc-thermal: Use scope-based cleanup helper
  PM: EM: Use scope-based cleanup helper

 arch/arm64/kernel/topology.c                  |  9 +++----
 drivers/acpi/processor_thermal.c              | 18 +++++--------
 drivers/cpufreq/intel_pstate.c                |  8 +++---
 drivers/cpufreq/longhaul.c                    |  3 +--
 drivers/cpufreq/powernv-cpufreq.c             | 11 ++++----
 drivers/devfreq/governor_passive.c            | 25 +++++++-----------
 drivers/gpu/drm/i915/gt/intel_llc.c           |  4 +--
 drivers/macintosh/windfarm_cpufreq_clamp.c    |  5 +---
 drivers/powercap/dtpm_cpu.c                   | 26 +++++--------------
 drivers/thermal/imx_thermal.c                 | 12 +++------
 .../ti-soc-thermal/ti-thermal-common.c        | 11 +++-----
 kernel/power/energy_model.c                   |  9 +++----
 12 files changed, 46 insertions(+), 95 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-09-03 11:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01  8:57 [PATCH v3 00/12] cpufreq: use __free() for all cpufreq_cpu_get() references Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 01/12] arm64: topology: Use scope-based cleanup helper Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 02/12] ACPI: processor: thermal: " Zihuan Zhang
2025-09-03 11:07   ` Rafael J. Wysocki
2025-09-01  8:57 ` [PATCH v3 03/12] cpufreq: intel_pstate: " Zihuan Zhang
2025-09-01 15:17   ` Rafael J. Wysocki
2025-09-02 10:32     ` Zihuan Zhang
2025-09-02 11:47       ` Rafael J. Wysocki
2025-09-03  0:51         ` Zihuan Zhang
2025-09-03 11:04           ` Rafael J. Wysocki
2025-09-01  8:57 ` [PATCH v3 04/12] cpufreq: longhaul: " Zihuan Zhang
2025-09-02 15:58   ` Krzysztof Kozlowski
2025-09-01  8:57 ` [PATCH v3 05/12] cpufreq: powernv: " Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 06/12] PM / devfreq: " Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 07/12] drm/i915: " Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 08/12] cpufreq: powerpc: macintosh: " Zihuan Zhang
2025-09-02 15:59   ` Krzysztof Kozlowski
2025-09-01  8:57 ` [PATCH v3 09/12] powercap: dtpm_cpu: " Zihuan Zhang
2025-09-03 11:43   ` Rafael J. Wysocki
2025-09-01  8:57 ` [PATCH v3 10/12] thermal: imx: " Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 11/12] thermal/drivers/ti-soc-thermal: " Zihuan Zhang
2025-09-01  8:57 ` [PATCH v3 12/12] PM: EM: " Zihuan Zhang
2025-09-02 15:57   ` Krzysztof Kozlowski
2025-09-03  2:12     ` Zihuan Zhang
2025-09-03  6:11       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).