From: Hans Zhang <18255117159@163.com>
To: ray.huang@amd.com, mario.limonciello@amd.com, rafael@kernel.org,
viresh.kumar@linaro.org, sven@kernel.org, j@jannau.net
Cc: perry.yuan@amd.com, kprateek.nayak@amd.com, neal@gompa.dev,
linux-pm@vger.kernel.org, asahi@lists.linux.dev,
linux-kernel@vger.kernel.org, Hans Zhang <18255117159@163.com>
Subject: [PATCH 0/2] *cpufreq: Use FIELD_MODIFY() for bitfield operations
Date: Fri, 1 May 2026 00:32:11 +0800 [thread overview]
Message-ID: <20260430163213.44695-1-18255117159@163.com> (raw)
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
next reply other threads:[~2026-04-30 16:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 16:32 Hans Zhang [this message]
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
2026-05-05 3:59 ` [PATCH 0/2] *cpufreq: Use FIELD_MODIFY() for bitfield operations Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260430163213.44695-1-18255117159@163.com \
--to=18255117159@163.com \
--cc=asahi@lists.linux.dev \
--cc=j@jannau.net \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=neal@gompa.dev \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=sven@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox