|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86: have cmpxchg16b() obey to Misra rule 11.8
commit d9e225afe68d3714e8d48422d85186bc06442046
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Oct 6 08:13:39 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Oct 6 08:13:39 2026 +0200
x86: have cmpxchg16b() obey to Misra rule 11.8
Casting away const-ness (or volatile-ness) is never a good idea, and
there's no need to in cmpxchg16b().
No functional change intended.
Fixes: e0116acbbd0b ("x86: add cmpxchg16b support")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/include/asm/x86_64/system.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/include/asm/x86_64/system.h
b/xen/arch/x86/include/asm/x86_64/system.h
index e94371cf20..1eb115370e 100644
--- a/xen/arch/x86/include/asm/x86_64/system.h
+++ b/xen/arch/x86/include/asm/x86_64/system.h
@@ -56,7 +56,7 @@ static always_inline __uint128_t cmpxchg16b_local_(
ASSERT(!((unsigned long)_p & 0xf)); \
BUILD_BUG_ON(sizeof(*(o)) != sizeof(__uint128_t)); \
BUILD_BUG_ON(sizeof(*(n)) != sizeof(__uint128_t)); \
- __cmpxchg16b(_p, (void *)(o), (void *)(n)); \
+ __cmpxchg16b(_p, (const void *)(o), (const void *)(n));\
})
#endif /* __X86_64_SYSTEM_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |