git: 3642ba2a9840 - main - hwpstate_amd: Fix compile error
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Jan 2026 06:11:17 UTC
The branch main has been updated by aokblast:
URL: https://cgit.FreeBSD.org/src/commit/?id=3642ba2a9840734d83dd77ca4c1aa0ecb3bfe879
commit 3642ba2a9840734d83dd77ca4c1aa0ecb3bfe879
Author: ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2026-01-03 05:07:15 +0000
Commit: ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-01-03 06:09:48 +0000
hwpstate_amd: Fix compile error
Add parentheses between OR and AND operator to pass the compiler check.
Approved by: lwhsu (mentor)
Fixes: 3e6e4e4a0d42 ("hwpstate: add CPPC support for pstate driver on AMD")
MFC aftert: 2 weeks
Differential Revision: https://reviews.freebsd.org/D54465
---
sys/x86/cpufreq/hwpstate_amd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c
index 4395e43a219f..ce0e0f6dd47a 100644
--- a/sys/x86/cpufreq/hwpstate_amd.c
+++ b/sys/x86/cpufreq/hwpstate_amd.c
@@ -118,7 +118,7 @@
#define BITS_VALUE(bits, num) (((num) & (bits)) >> (ffsll((bits)) - 1))
#define BITS_WITH_VALUE(bits, val) ((uintmax_t)(val) << (ffsll((bits)) - 1))
#define SET_BITS_VALUE(var, bits, val) \
- ((var) = (var) & ~(bits) | BITS_WITH_VALUE((bits), (val)))
+ ((var) = ((var) & ~(bits)) | BITS_WITH_VALUE((bits), (val)))
#define HWPSTATE_DEBUG(dev, msg...) \
do { \