fix parted of "missing for discarded return value"

MISRA C required that return value should be used, missing for it should
add "(void)" prefix before the function call.
Some function can be declared without return value to avoid this problem.

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2018-06-19 10:15:48 +08:00
committed by lijinxia
parent b8bdf171eb
commit 977c4b20b5
24 changed files with 46 additions and 63 deletions

View File

@@ -35,7 +35,7 @@ enum {
struct vhm_request;
int acrn_insert_request_wait(struct vcpu *vcpu, struct vhm_request *req);
int get_req_info(char *str, int str_max);
void get_req_info(char *str, int str_max);
/*
* VCPU related APIs

View File

@@ -260,7 +260,7 @@ struct vcpu* get_ever_run_vcpu(int pcpu_id);
int create_vcpu(int cpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle);
int start_vcpu(struct vcpu *vcpu);
int shutdown_vcpu(struct vcpu *vcpu);
int destroy_vcpu(struct vcpu *vcpu);
void destroy_vcpu(struct vcpu *vcpu);
void reset_vcpu(struct vcpu *vcpu);
void pause_vcpu(struct vcpu *vcpu, enum vcpu_state new_state);

View File

@@ -53,5 +53,5 @@ bool vioapic_get_rte(struct vm *vm, int pin, void *rte);
int vioapic_mmio_access_handler(struct vcpu *vcpu, struct mem_io *mmio,
void *handler_private_data);
int get_vioapic_info(char *str, int str_max, int vmid);
void get_vioapic_info(char *str, int str_max, int vmid);
#endif

View File

@@ -170,7 +170,7 @@ struct vm_description {
};
int shutdown_vm(struct vm *vm);
int pause_vm(struct vm *vm);
void pause_vm(struct vm *vm);
int start_vm(struct vm *vm);
int create_vm(struct vm_description *vm_desc, struct vm **vm);
int prepare_vm0(void);

View File

@@ -135,7 +135,7 @@ normal_register_handler(uint32_t irq,
const char *name);
void unregister_handler_common(struct dev_handler_node *node);
int get_cpu_interrupt_info(char *str, int str_max);
void get_cpu_interrupt_info(char *str, int str_max);
void setup_notification(void);
@@ -157,11 +157,11 @@ extern spurious_handler_t spurious_handler;
#define HV_ARCH_VCPU_BLOCKED_BY_MOVSS (1<<1)
#define HV_ARCH_VCPU_BLOCKED_BY_STI (1<<0)
int vcpu_inject_extint(struct vcpu *vcpu);
int vcpu_inject_nmi(struct vcpu *vcpu);
void vcpu_inject_extint(struct vcpu *vcpu);
void vcpu_inject_nmi(struct vcpu *vcpu);
int vcpu_inject_gp(struct vcpu *vcpu, uint32_t err_code);
int vcpu_inject_pf(struct vcpu *vcpu, uint64_t addr, uint32_t err_code);
int vcpu_make_request(struct vcpu *vcpu, int eventid);
void vcpu_make_request(struct vcpu *vcpu, int eventid);
int vcpu_queue_exception(struct vcpu *vcpu, uint32_t vector, uint32_t err_code);
int exception_vmexit_handler(struct vcpu *vcpu);

View File

@@ -159,7 +159,7 @@ void write_lapic_reg32(uint32_t offset, uint32_t value);
void save_lapic(struct lapic_regs *regs);
int early_init_lapic(void);
int init_lapic(uint32_t cpu_id);
int send_lapic_eoi(void);
void send_lapic_eoi(void);
uint32_t get_cur_lapic_id(void);
int send_startup_ipi(enum intr_cpu_startup_shorthand cpu_startup_shorthand,
uint32_t cpu_startup_dest,

View File

@@ -54,7 +54,7 @@ static inline void initialize_timer(struct timer *timer,
int add_timer(struct timer *timer);
void del_timer(struct timer *timer);
int timer_softirq(int pcpu_id);
void timer_softirq(int pcpu_id);
void timer_init(void);
void timer_cleanup(void);
void check_tsc(void);

View File

@@ -16,7 +16,7 @@ int vmexit_handler(struct vcpu *vcpu);
int vmcall_vmexit_handler(struct vcpu *vcpu);
int cpuid_vmexit_handler(struct vcpu *vcpu);
int cr_access_vmexit_handler(struct vcpu *vcpu);
int get_vmexit_profile(char *str, int str_max);
void get_vmexit_profile(char *str, int str_max);
#define VM_EXIT_QUALIFICATION_BIT_MASK(exit_qual, MSB, LSB) \
(exit_qual & (((1UL << (MSB+1))-1) - ((1UL << (LSB))-1)))

View File

@@ -70,7 +70,7 @@ extern spinlock_t softirq_dev_lock;
void ptdev_softirq(int cpu);
void ptdev_init(void);
void ptdev_release_all_entries(struct vm *vm);
int get_ptdev_info(char *str, int str_max);
void get_ptdev_info(char *str, int str_max);
struct ptdev_remapping_info *ptdev_dequeue_softirq(void);
struct ptdev_remapping_info *alloc_entry(struct vm *vm,

View File

@@ -19,18 +19,16 @@ typedef struct _spinlock {
} spinlock_t;
/* Function prototypes */
int spinlock_init(spinlock_t *lock);
int spinlock_obtain(spinlock_t *lock);
void spinlock_init(spinlock_t *lock);
void spinlock_obtain(spinlock_t *lock);
static inline int spinlock_release(spinlock_t *lock)
static inline void spinlock_release(spinlock_t *lock)
{
/* Increment tail of queue */
asm volatile (" lock incl %[tail]\n"
:
: [tail] "m" (lock->tail)
: "cc", "memory");
return 0;
}
#else /* ASSEMBLER */