mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
HV: include: integral type cleanup
This patch cleans up the integral type violations to MISRA C rules, mostly
related to signed constants that should be unsigned but also spelling out two
integer narrowing and dropping some macros negating unsigned integers.
v1 -> v2:
* Drop INT_ROUNDUPx macros since they are never used.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -462,8 +462,8 @@ write_xcr(int reg, uint64_t val)
|
||||
{
|
||||
uint32_t low, high;
|
||||
|
||||
low = val;
|
||||
high = val >> 32;
|
||||
low = (uint32_t)val;
|
||||
high = (uint32_t)(val >> 32);
|
||||
asm volatile("xsetbv" : : "c" (reg), "a" (low), "d" (high));
|
||||
}
|
||||
#else /* ASSEMBLER defined */
|
||||
|
||||
Reference in New Issue
Block a user