On Fri, Aug 22, 2025 at 9:04 AM Zihuan Zhang <zhangzihuan@kylinos.cn> wrote:
>
> This series contains two small cpufreq cleanups:
>
> 1) Use strlen() as the length argument for strncasecmp() in
> cpufreq_parse_policy(). This makes comparison more permissive
> (prefix match), which is consistent with the intention in our
> deployment and improves readability over using CPUFREQ_NAME_LEN.
>
> 2) The second patch is new in this version. It simplifies the validation
> logic in cpufreq_register_driver().This makes the registration code
> more straightforward without changing functionality.
>
> Changes since v2:
> - Fix code suggested by Viresh Kumar
>
> Changes since v1:
> - Dropped the second patch from v1, which was not needed.
> - Kept the first patch as-is (already Acked).
> - Added a new second patch to simplify driver registration checks
>
> Zihuan Zhang (2):
> cpufreq: use strlen() for governor name comparison
> cpufreq: simplify setpolicy/target check in driver verification
>
> drivers/cpufreq/cpufreq.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> --
Both patches applied as 6.18 material, thanks!