diff options
author | Zihuan Zhang <zhangzihuan@kylinos.cn> | 2025-09-08 11:57:38 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-09-20 00:11:44 +0300 |
commit | 7c0dde86c17665cb27e1c8dd23d263e2ed2d5b50 (patch) | |
tree | 0fd73538093ebc07004da73ff6b0fb8d07cde5b8 /tools/testing/shared/xarray-shared.c | |
parent | 46c435cbaf5591a349c339e080ac2a228aa99649 (diff) | |
download | linux-7c0dde86c17665cb27e1c8dd23d263e2ed2d5b50.tar.xz |
cpufreq: Add defensive check during driver registration
Currently, cpufreq allows drivers to implement both ->target() and
->target_index() callbacks, but that can lead to ambiguous or incorrect
behavior.
For this reason, prevent cpufreq drivers implementing both ->target()
and ->target_index() at the same time from registering.
This check can help to catch driver implementation mistakes early and
improve overall robustness, without affecting existing valid drivers.
Signed-off-by: Zihuan Zhang <zhangzihuan@kylinos.cn>
Link: https://patch.msgid.link/20250908085738.31602-1-zhangzihuan@kylinos.cn
[ rjw: Subject adjustment and changelog rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/testing/shared/xarray-shared.c')
0 files changed, 0 insertions, 0 deletions