]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpufreq: intel_pstate: Rearrange freq QoS updates using __free()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 5 Sep 2025 13:52:54 +0000 (15:52 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Sep 2025 10:58:54 +0000 (12:58 +0200)
commitf1bbf5bbf254cba0ae3a46cf4c0a9a6257805b79
tree3bc200efe93d36cb9e81a805390fe265714c49c6
parent69e5d50fcf4093fb3f9f41c4f931f12c2ca8c467
cpufreq: intel_pstate: Rearrange freq QoS updates using __free()

Move the code from the for_each_possible_cpu() loop in update_qos_request()
to a separate function and use __free() for cpufreq policy reference
counting in it to avoid having to call cpufreq_cpu_put() repeatedly (or
using goto).

While at it, rename update_qos_request() to update_qos_requests()
because it updates multiple requests in one go.

No intentional functional impact.

Link: https://lore.kernel.org/linux-pm/CAJZ5v0gN1T5woSF0tO=TbAh+2-sWzxFjWyDbB7wG2TFCOU01iQ@mail.gmail.com/
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Zihuan Zhang <zhangzihuan@kylinos.cn>
Link: https://patch.msgid.link/3026597.e9J7NaK4W3@rafael.j.wysocki
[ rjw: Rename "cpu" to "cpudata" and "cpunum" to "cpu" in new code ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c