public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] *cpufreq: Use FIELD_MODIFY() for bitfield operations
@ 2026-04-30 16:32 Hans Zhang
  2026-04-30 16:32 ` [PATCH 1/2] cpufreq/amd-pstate: Use FIELD_MODIFY() Hans Zhang
  2026-04-30 16:32 ` [PATCH 2/2] cpufreq: apple-soc: " Hans Zhang
  0 siblings, 2 replies; 5+ messages in thread
From: Hans Zhang @ 2026-04-30 16:32 UTC (permalink / raw)
  To: ray.huang, mario.limonciello, rafael, viresh.kumar, sven, j
  Cc: perry.yuan, kprateek.nayak, neal, linux-pm, asahi, linux-kernel,
	Hans Zhang

Replace open-coded bitfield modifications with the standard FIELD_MODIFY()
macro. This improves code readability and safety without functional
changes.

FIELD_MODIFY() internally performs the same mask-clear + set operation but
adds type checking and compile-time field boundary verification.

Hans Zhang (2):
  cpufreq/amd-pstate: Use FIELD_MODIFY()
  cpufreq: apple-soc: Use FIELD_MODIFY()

 drivers/cpufreq/amd-pstate.c        | 26 ++++++++++----------------
 drivers/cpufreq/apple-soc-cpufreq.c |  6 ++----
 2 files changed, 12 insertions(+), 20 deletions(-)


base-commit: 3b3bea6d4b9c162f9e555905d96b8c1da67ecd5b
-- 
2.34.1


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

end of thread, other threads:[~2026-05-01  5:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 16:32 [PATCH 0/2] *cpufreq: Use FIELD_MODIFY() for bitfield operations Hans Zhang
2026-04-30 16:32 ` [PATCH 1/2] cpufreq/amd-pstate: Use FIELD_MODIFY() Hans Zhang
2026-05-01  5:27   ` K Prateek Nayak
2026-04-30 16:32 ` [PATCH 2/2] cpufreq: apple-soc: " Hans Zhang
2026-04-30 19:54   ` Joshua Peisach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox