On 01/09/2025 10:57, Zihuan Zhang wrote:
> + struct cpufreq_policy *policy __free(put_cpufreq_policy) =
> cpufreq_cpu_get(0);
> struct wf_control *clamp;
> struct device *dev;
> int ret;
>
> - policy = cpufreq_cpu_get(0);
> if (!policy) {
> pr_warn("%s: cpufreq policy not found cpu0\n", __func__);
> return -EPROBE_DEFER;
> @@ -79,8 +78,6 @@ static int __init wf_cpufreq_clamp_init(void)
> ret = freq_qos_add_request(&policy->constraints, &qos_req, FREQ_QOS_MAX,
> max_freq);
>
> - cpufreq_cpu_put(policy);
> -
Not much improvement. Previously this was simple code, easy to grasp.
Best regards,
Krzysztof- [PATCH v3 02/12] ACPI: processor: thermal: Use scope-b... Zihuan Zhang
- [PATCH v3 07/12] drm/i915: Use scope-based cleanup hel... Zihuan Zhang
- [PATCH v3 09/12] powercap: dtpm_cpu: Use scope-based c... Zihuan Zhang
- [PATCH v3 06/12] PM / devfreq: Use scope-based cleanup... Zihuan Zhang
- [PATCH v3 03/12] cpufreq: intel_pstate: Use scope-base... Zihuan Zhang
- Re: [PATCH v3 03/12] cpufreq: intel_pstate: Use s... Rafael J. Wysocki
- Re: [PATCH v3 03/12] cpufreq: intel_pstate: U... Zihuan Zhang
- Re: [PATCH v3 03/12] cpufreq: intel_pstat... Rafael J. Wysocki
- Re: [PATCH v3 03/12] cpufreq: intel_p... Zihuan Zhang
- [PATCH v3 08/12] cpufreq: powerpc: macintosh: Use scop... Zihuan Zhang
- Re: [PATCH v3 08/12] cpufreq: powerpc: macintosh:... Krzysztof Kozlowski
- [PATCH v3 04/12] cpufreq: longhaul: Use scope-based cl... Zihuan Zhang
- Re: [PATCH v3 04/12] cpufreq: longhaul: Use scope... Krzysztof Kozlowski
- [PATCH v3 01/12] arm64: topology: Use scope-based clea... Zihuan Zhang
- [PATCH v3 11/12] thermal/drivers/ti-soc-thermal: Use s... Zihuan Zhang
- [PATCH v3 10/12] thermal: imx: Use scope-based cleanup... Zihuan Zhang
- [PATCH v3 12/12] PM: EM: Use scope-based cleanup helpe... Zihuan Zhang
- Re: [PATCH v3 12/12] PM: EM: Use scope-based clea... Krzysztof Kozlowski
- Re: [PATCH v3 12/12] PM: EM: Use scope-based ... Zihuan Zhang
- Re: [PATCH v3 12/12] PM: EM: Use scope-ba... Krzysztof Kozlowski
- [PATCH v3 05/12] cpufreq: powernv: Use scope-based cle... Zihuan Zhang
