linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] cpufreq: Cleanups and minor fixes
@ 2025-08-22  7:04 Zihuan Zhang
  2025-08-22  7:04 ` [PATCH v3 1/2] cpufreq: use strlen() for governor name comparison Zihuan Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zihuan Zhang @ 2025-08-22  7:04 UTC (permalink / raw)
  To: rafael J . wysocki, Viresh Kumar
  Cc: zhenglifeng, linux-pm, linux-kernel, Zihuan Zhang

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(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-22 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22  7:04 [PATCH v3 0/2] cpufreq: Cleanups and minor fixes Zihuan Zhang
2025-08-22  7:04 ` [PATCH v3 1/2] cpufreq: use strlen() for governor name comparison Zihuan Zhang
2025-08-22  7:04 ` [PATCH v3 2/2] cpufreq: simplify setpolicy/target check in driver verification Zihuan Zhang
2025-08-22  7:16   ` Viresh Kumar
2025-08-22 19:35 ` [PATCH v3 0/2] cpufreq: Cleanups and minor fixes Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).