lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819103940.342774-1-zhangzihuan@kylinos.cn>
Date: Tue, 19 Aug 2025 18:39:38 +0800
From: Zihuan Zhang <zhangzihuan@...inos.cn>
To: "rafael J . wysocki" <rafael@...nel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>
Cc: zhenglifeng <zhenglifeng1@...wei.com>,
	linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zihuan Zhang <zhangzihuan@...inos.cn>
Subject: [PATCH 0/2] cpufreq: minor cleanups around policy parsing and API

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) Drop the redundant `new_pol` parameter from cpufreq_set_policy().
     Only drivers that implement ->setpolicy would ever care about
     policy values, and passing `new_pol` around is unnecessary.
     Callers now pass just the policy and (where applicable) the
     governor pointer; drivers can read policy->policy directly.

No functional regressions are expected for drivers which do not
implement ->setpolicy (e.g. acpi-cpufreq), as they ignore policy
values anyway.

Zihuan Zhang (2):
  cpufreq: use strlen() for governor name comparison
  cpufreq: simplify cpufreq_set_policy() interface

 drivers/cpufreq/cpufreq.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ