HV: vlapic: add suffix 'U' when necessary

For constants used in unsigned contexts, a 'U' suffix is required per MISRA C
standard.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Dong Eddie <eddie.dong@intel.com>
This commit is contained in:
Junjie Mao
2018-07-13 17:00:22 +08:00
committed by lijinxia
parent 1af8586cd1
commit 87f2d4c042
4 changed files with 114 additions and 112 deletions

View File

@@ -272,7 +272,7 @@ struct ioapic {
/* constants relating to APIC ID registers */
#define APIC_ID_MASK 0xff000000U
#define APIC_ID_SHIFT 24
#define APIC_ID_SHIFT 24U
#define APIC_ID_CLUSTER 0xf0U
#define APIC_ID_CLUSTER_ID 0x0fU
#define APIC_MAX_CLUSTER 0xeU
@@ -282,7 +282,7 @@ struct ioapic {
/* fields in VER */
#define APIC_VER_VERSION 0x000000ffU
#define APIC_VER_MAXLVT 0x00ff0000U
#define MAXLVTSHIFT 16
#define MAXLVTSHIFT 16U
#define APIC_VER_EOI_SUPPRESSION 0x01000000U
#define APIC_VER_AMD_EXT_SPACE 0x80000000U

View File

@@ -58,7 +58,7 @@
#define VMX_EOI_EXIT2_HIGH 0x00002021U
#define VMX_EOI_EXIT3_FULL 0x00002022U
#define VMX_EOI_EXIT3_HIGH 0x00002023U
#define VMX_EOI_EXIT(vector) (VMX_EOI_EXIT0_FULL + ((vector) / 64) * 2)
#define VMX_EOI_EXIT(vector) (VMX_EOI_EXIT0_FULL + ((vector) / 64U) * 2U)
#define VMX_XSS_EXITING_BITMAP_FULL 0x0000202CU
#define VMX_XSS_EXITING_BITMAP_HIGH 0x0000202DU
/* 64-bit read-only data fields */
@@ -376,7 +376,7 @@
* 15 = guest-physical access for an instructon fetch or during
* instruction execution
*/
#define APIC_ACCESS_TYPE(qual) (((qual) >> 12) & 0xFU)
#define APIC_ACCESS_TYPE(qual) (((qual) >> 12U) & 0xFUL)
#define APIC_ACCESS_OFFSET(qual) ((qual) & 0xFFFU)