hv: include: fix 'Unused procedure parameter'

MISRA-C requires that there should be no unused parameters in
functions.

This patch removes the unused parameters that is not being used
unconditionally.

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-09-26 14:54:31 +08:00 committed by lijinxia
parent 68ce114b43
commit 026ae83bd5
8 changed files with 14 additions and 18 deletions

View File

@ -450,8 +450,7 @@ static void bsp_boot_post(void)
calibrate_tsc(); calibrate_tsc();
/* Enable logging */ /* Enable logging */
init_logmsg(CONFIG_LOG_BUF_SIZE, init_logmsg(CONFIG_LOG_DESTINATION);
CONFIG_LOG_DESTINATION);
pr_acrnlog("HV version %s-%s-%s %s (daily tag:%s) build by %s, start time %lluus", pr_acrnlog("HV version %s-%s-%s %s (daily tag:%s) build by %s, start time %lluus",
HV_FULL_VERSION, HV_FULL_VERSION,

View File

@ -257,8 +257,7 @@ hv_emulate_mmio(struct vcpu *vcpu, struct io_request *io_req)
return -EIO; return -EIO;
} else { } else {
/* Handle this MMIO operation */ /* Handle this MMIO operation */
status = mmio_handler->read_write(vcpu, io_req, status = mmio_handler->read_write(vcpu, io_req);
mmio_handler->handler_private_data);
break; break;
} }
} }

View File

@ -69,7 +69,7 @@ static void do_copy_earlylog(struct shared_buf *dst_sbuf,
} }
} }
void init_logmsg(__unused uint32_t mem_size, uint32_t flags) void init_logmsg(uint32_t flags)
{ {
uint16_t pcpu_id; uint16_t pcpu_id;

View File

@ -529,8 +529,7 @@ vioapic_pincount(struct vm *vm)
} }
} }
int vioapic_mmio_access_handler(struct vcpu *vcpu, struct io_request *io_req, int vioapic_mmio_access_handler(struct vcpu *vcpu, struct io_request *io_req)
__unused void *handler_private_data)
{ {
struct vm *vm = vcpu->vm; struct vm *vm = vcpu->vm;
struct acrn_vioapic *vioapic; struct acrn_vioapic *vioapic;

View File

@ -61,7 +61,7 @@ uint32_t vioapic_pincount(struct vm *vm);
void vioapic_process_eoi(struct vm *vm, uint32_t vector); void vioapic_process_eoi(struct vm *vm, uint32_t vector);
void vioapic_get_rte(struct vm *vm, uint32_t pin, union ioapic_rte *rte); void vioapic_get_rte(struct vm *vm, uint32_t pin, union ioapic_rte *rte);
int vioapic_mmio_access_handler(struct vcpu *vcpu, int vioapic_mmio_access_handler(struct vcpu *vcpu,
struct io_request *io_req, __unused void *handler_private_data); struct io_request *io_req);
#ifdef HV_DEBUG #ifdef HV_DEBUG
void get_vioapic_info(char *str_arg, int str_max, uint16_t vmid); void get_vioapic_info(char *str_arg, int str_max, uint16_t vmid);

View File

@ -94,8 +94,8 @@ struct vm_io_handler {
/* Typedef for MMIO handler and range check routine */ /* Typedef for MMIO handler and range check routine */
struct mmio_request; struct mmio_request;
typedef int (*hv_mem_io_handler_t)(struct vcpu *vcpu, struct io_request *io_req, typedef int (*hv_mem_io_handler_t)(struct vcpu *vcpu,
void *handler_private_data); struct io_request *io_req);
/* Structure for MMIO handler node */ /* Structure for MMIO handler node */
struct mem_io_node { struct mem_io_node {

View File

@ -31,7 +31,7 @@
extern uint32_t console_loglevel; extern uint32_t console_loglevel;
extern uint32_t mem_loglevel; extern uint32_t mem_loglevel;
extern uint32_t npk_loglevel; extern uint32_t npk_loglevel;
void init_logmsg(__unused uint32_t mem_size, uint32_t flags); void init_logmsg(uint32_t flags);
void print_logmsg_buffer(uint16_t pcpu_id); void print_logmsg_buffer(uint16_t pcpu_id);
void do_logmsg(uint32_t severity, const char *fmt, ...); void do_logmsg(uint32_t severity, const char *fmt, ...);
@ -70,8 +70,7 @@ int vprintf(const char *fmt, va_list args);
#else /* HV_DEBUG */ #else /* HV_DEBUG */
static inline void init_logmsg(__unused uint32_t mem_size, static inline void init_logmsg(__unused uint32_t flags)
__unused uint32_t flags)
{ {
} }

View File

@ -76,7 +76,7 @@ struct trace_entry {
} __attribute__((aligned(8))); } __attribute__((aligned(8)));
static inline bool static inline bool
trace_check(uint16_t cpu_id, __unused uint32_t evid) trace_check(uint16_t cpu_id)
{ {
if (per_cpu(sbuf, cpu_id)[ACRN_TRACE] == NULL) { if (per_cpu(sbuf, cpu_id)[ACRN_TRACE] == NULL) {
return false; return false;
@ -105,7 +105,7 @@ TRACE_2L(uint32_t evid, uint64_t e, uint64_t f)
struct trace_entry entry; struct trace_entry entry;
uint16_t cpu_id = get_cpu_id(); uint16_t cpu_id = get_cpu_id();
if (!trace_check(cpu_id, evid)) { if (!trace_check(cpu_id)) {
return; return;
} }
@ -121,7 +121,7 @@ TRACE_4I(uint32_t evid, uint32_t a, uint32_t b, uint32_t c,
struct trace_entry entry; struct trace_entry entry;
uint16_t cpu_id = get_cpu_id(); uint16_t cpu_id = get_cpu_id();
if (!trace_check(cpu_id, evid)) { if (!trace_check(cpu_id)) {
return; return;
} }
@ -139,7 +139,7 @@ TRACE_6C(uint32_t evid, uint8_t a1, uint8_t a2, uint8_t a3,
struct trace_entry entry; struct trace_entry entry;
uint16_t cpu_id = get_cpu_id(); uint16_t cpu_id = get_cpu_id();
if (!trace_check(cpu_id, evid)) { if (!trace_check(cpu_id)) {
return; return;
} }
@ -163,7 +163,7 @@ TRACE_16STR(uint32_t evid, const char name[])
uint16_t cpu_id = get_cpu_id(); uint16_t cpu_id = get_cpu_id();
size_t len, i; size_t len, i;
if (!trace_check(cpu_id, evid)) { if (!trace_check(cpu_id)) {
return; return;
} }