From 7becd32d84e78e3069fcfab9bbe255bab8bfcc35 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 5 Dec 2025 19:26:47 +0000 Subject: [PATCH] x86/ucode: Don't cast away const-ness in cmp_patch_id() Fixes a volation of MISRA rule 11.8. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/cpu/microcode/amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/microcode/amd.c b/xen/arch/x86/cpu/microcode/amd.c index adabe6e6e8..2760ace921 100644 --- a/xen/arch/x86/cpu/microcode/amd.c +++ b/xen/arch/x86/cpu/microcode/amd.c @@ -106,7 +106,7 @@ static bool __ro_after_init entrysign_mitigiated_in_firmware; static int cf_check cmp_patch_id(const void *key, const void *elem) { const struct patch_digest *pd = elem; - uint32_t patch_id = *(uint32_t *)key; + uint32_t patch_id = *(const uint32_t *)key; if ( patch_id == pd->patch_id ) return 0;