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 00/12] cpufreq: use __free() for all cpufreq... Zihuan Zhang
- [PATCH v3 08/12] cpufreq: powerpc: macintosh: Use... Zihuan Zhang
- Re: [PATCH v3 08/12] cpufreq: powerpc: macint... Krzysztof Kozlowski
- [PATCH v3 11/12] thermal/drivers/ti-soc-thermal: ... Zihuan Zhang
- [PATCH v3 12/12] PM: EM: Use scope-based cleanup ... Zihuan Zhang
- Re: [PATCH v3 12/12] PM: EM: Use scope-based ... Krzysztof Kozlowski
- Re: [PATCH v3 12/12] PM: EM: Use scope-ba... Zihuan Zhang
- Re: [PATCH v3 12/12] PM: EM: Use scop... Krzysztof Kozlowski
- [PATCH v3 06/12] PM / devfreq: Use scope-based cl... Zihuan Zhang
- [PATCH v3 10/12] thermal: imx: Use scope-based cl... Zihuan Zhang
- [PATCH v3 09/12] powercap: dtpm_cpu: Use scope-ba... Zihuan Zhang
- Re: [PATCH v3 09/12] powercap: dtpm_cpu: Use ... Rafael J. Wysocki
- ✓ i915.CI.BAT: success for cpufreq: use __free() ... Patchwork