mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
fix "function return type inconsistent"
MISRA C required function return type should be consistented. Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Xie, nanlin
parent
1a607b669d
commit
9600dfa07d
@@ -363,7 +363,7 @@ static inline void clflush(volatile void *p)
|
||||
extern uint8_t CPU_Boot_Page_Tables_Start_VM[];
|
||||
|
||||
/* External Interfaces */
|
||||
int is_ept_supported(void);
|
||||
bool is_ept_supported(void);
|
||||
uint64_t create_guest_initial_paging(struct vm *vm);
|
||||
void destroy_ept(struct vm *vm);
|
||||
uint64_t gpa2hpa(struct vm *vm, uint64_t gpa);
|
||||
|
@@ -425,7 +425,7 @@ static inline uint8_t get_vcpu_mode(struct vcpu *vcpu)
|
||||
|
||||
static inline bool cpu_has_vmx_unrestricted_guest_cap(void)
|
||||
{
|
||||
return !!(msr_read(MSR_IA32_VMX_MISC) & VMX_SUPPORT_UNRESTRICTED_GUEST);
|
||||
return ((msr_read(MSR_IA32_VMX_MISC) & VMX_SUPPORT_UNRESTRICTED_GUEST) != 0UL);
|
||||
}
|
||||
|
||||
typedef struct _descriptor_table_{
|
||||
|
@@ -23,7 +23,7 @@ void get_schedule_lock(uint16_t pcpu_id);
|
||||
void release_schedule_lock(uint16_t pcpu_id);
|
||||
|
||||
void set_pcpu_used(uint16_t pcpu_id);
|
||||
int allocate_pcpu(void);
|
||||
uint16_t allocate_pcpu(void);
|
||||
void free_pcpu(uint16_t pcpu_id);
|
||||
|
||||
void add_vcpu_to_runqueue(struct vcpu *vcpu);
|
||||
|
@@ -174,13 +174,13 @@ build_bitmap_clear(bitmap_clear, BUS_LOCK, nr, addr)
|
||||
*/
|
||||
static inline bool bitmap_test(int nr, volatile unsigned long *addr)
|
||||
{
|
||||
int ret;
|
||||
int32_t ret;
|
||||
|
||||
asm volatile("btq %2,%1\n\tsbbl %0, %0"
|
||||
: "=r" (ret), "=m" (*addr)
|
||||
: "r" ((long)(nr & 0x3f))
|
||||
: "cc", "memory");
|
||||
return (!!ret);
|
||||
return (ret != 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -191,12 +191,12 @@ static inline bool bitmap_test(int nr, volatile unsigned long *addr)
|
||||
#define build_bitmap_testandset(name, lock, nr, addr) \
|
||||
static inline bool name(int nr, volatile unsigned long *addr) \
|
||||
{ \
|
||||
int ret; \
|
||||
int32_t ret; \
|
||||
asm volatile(lock "btsq %2,%1\n\tsbbl %0,%0" \
|
||||
: "=r" (ret), "=m" (*addr) \
|
||||
: "r" ((long)(nr & 0x3f)) \
|
||||
: "cc", "memory"); \
|
||||
return (!!ret); \
|
||||
return (ret != 0); \
|
||||
}
|
||||
build_bitmap_testandset(__bitmap_test_and_set, "", nr, addr)
|
||||
build_bitmap_testandset(bitmap_test_and_set, BUS_LOCK, nr, addr)
|
||||
@@ -209,12 +209,12 @@ build_bitmap_testandset(bitmap_test_and_set, BUS_LOCK, nr, addr)
|
||||
#define build_bitmap_testandclear(name, lock, nr, addr) \
|
||||
static inline bool name(int nr, volatile unsigned long *addr) \
|
||||
{ \
|
||||
int ret; \
|
||||
int32_t ret; \
|
||||
asm volatile(lock "btrq %2,%1\n\tsbbl %0,%0" \
|
||||
: "=r" (ret), "=m" (*addr) \
|
||||
: "r" ((long)(nr & 0x3f)) \
|
||||
: "cc", "memory"); \
|
||||
return (!!ret); \
|
||||
return (ret != 0); \
|
||||
}
|
||||
build_bitmap_testandclear(__bitmap_test_and_clear, "", nr, addr)
|
||||
build_bitmap_testandclear(bitmap_test_and_clear, BUS_LOCK, nr, addr)
|
||||
|
Reference in New Issue
Block a user