Skip to contentSkip to conversation

x86/emul: Adjust X86EMUL_OPC_EXT_MASK to placate MISRA

PATCH In review Andrew Cooper 2 participants 2 messages Apr 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/emul: Adjust X86EMUL_OPC_EXT_MASK to placate MISRA

Resolves 4740 MISRA R7.2 violations.

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: [email protected] <[email protected]>
CC: Roberto Bagnara <[email protected]>
CC: Federico Serafini <[email protected]>
CC: Nicola Vetrini <[email protected]>

of 4935, so 96% of them...

---
 xen/arch/x86/x86_emulate/x86_emulate.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/x86_emulate/x86_emulate.h +1 -1
index 698750267a90..d92be69d84d9 100644
@@ -620,7 +620,7 @@ struct x86_emulate_ctxt
  * below).
  * Hence no separate #define-s get added.
  */
-#define X86EMUL_OPC_EXT_MASK         0xffff0000
+#define X86EMUL_OPC_EXT_MASK         0xffff0000U
 #define X86EMUL_OPC(ext, byte)       ((uint8_t)(byte) | \
                                       MASK_INSR((ext), X86EMUL_OPC_EXT_MASK))
 /*

base-commit: 0e7ea8ca5fc9bce9248414f6aaf2dc861abd45d9
prerequisite-patch-id: 8d06e56c5d8a52f1387e1f5a7fce6a94b8c4a1ed
prerequisite-patch-id: 13355d26254b979c79de456c9a6ea6a9c639ba63
prerequisite-patch-id: d1f308616490257685a49248e29f1b3516c2dde4

Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Andrew Cooper

Resolves 4740 MISRA R7.2 violations.

LOL!!

Quoted 1 line
Quoted 35 lines

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: [email protected] <[email protected]>
CC: Roberto Bagnara <[email protected]>
CC: Federico Serafini <[email protected]>
CC: Nicola Vetrini <[email protected]>

of 4935, so 96% of them...

---
 xen/arch/x86/x86_emulate/x86_emulate.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/x86_emulate/x86_emulate.h +1 -1
index 698750267a90..d92be69d84d9 100644
@@ -620,7 +620,7 @@ struct x86_emulate_ctxt
  * below).
  * Hence no separate #define-s get added.
  */
-#define X86EMUL_OPC_EXT_MASK         0xffff0000
+#define X86EMUL_OPC_EXT_MASK         0xffff0000U
 #define X86EMUL_OPC(ext, byte)       ((uint8_t)(byte) | \
                                       MASK_INSR((ext), X86EMUL_OPC_EXT_MASK))
 /*

base-commit: 0e7ea8ca5fc9bce9248414f6aaf2dc861abd45d9
prerequisite-patch-id: 8d06e56c5d8a52f1387e1f5a7fce6a94b8c4a1ed
prerequisite-patch-id: 13355d26254b979c79de456c9a6ea6a9c639ba63
prerequisite-patch-id: d1f308616490257685a49248e29f1b3516c2dde4

Signature · 1 line
2.30.2