hv: fix integer violations

The operands to shift operations (<<, >>) shall be unsigned integers.

v1 -> v2:
 * replace 12U with CPU_PAGE_SHIFT when it is address shift case.
 * replace 6UL with 0x6UL

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shiqing Gao
2018-10-31 10:43:12 +08:00
committed by lijinxia
parent 4d01e60eda
commit 60d0a75243
12 changed files with 54 additions and 54 deletions

View File

@@ -114,7 +114,7 @@ struct vm_arch {
} __aligned(CPU_PAGE_SIZE);
#define CPUID_CHECK_SUBLEAF (1U << 0)
#define CPUID_CHECK_SUBLEAF (1U << 0U)
#define MAX_VM_VCPUID_ENTRIES 64U
struct vcpuid_entry {
uint32_t eax;

View File

@@ -64,6 +64,6 @@ static inline uint64_t rdtsc(void)
uint32_t lo, hi;
asm volatile("rdtsc" : "=a" (lo), "=d" (hi));
return ((uint64_t)hi << 32) | lo;
return ((uint64_t)hi << 32U) | lo;
}
#endif /* RTL_H */