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

@@ -61,7 +61,7 @@ uint32_t vioapic_pincount(struct vm *vm);
void vioapic_process_eoi(struct vm *vm, uint32_t vector);
void vioapic_get_rte(struct vm *vm, uint32_t pin, union ioapic_rte *rte);
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
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 */
struct mmio_request;
typedef int (*hv_mem_io_handler_t)(struct vcpu *vcpu, struct io_request *io_req,
void *handler_private_data);
typedef int (*hv_mem_io_handler_t)(struct vcpu *vcpu,
struct io_request *io_req);
/* Structure for MMIO handler node */
struct mem_io_node {

View File

@@ -31,7 +31,7 @@
extern uint32_t console_loglevel;
extern uint32_t mem_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 do_logmsg(uint32_t severity, const char *fmt, ...);
@@ -70,8 +70,7 @@ int vprintf(const char *fmt, va_list args);
#else /* HV_DEBUG */
static inline void init_logmsg(__unused uint32_t mem_size,
__unused uint32_t flags)
static inline void init_logmsg(__unused uint32_t flags)
{
}

View File

@@ -76,7 +76,7 @@ struct trace_entry {
} __attribute__((aligned(8)));
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) {
return false;
@@ -105,7 +105,7 @@ TRACE_2L(uint32_t evid, uint64_t e, uint64_t f)
struct trace_entry entry;
uint16_t cpu_id = get_cpu_id();
if (!trace_check(cpu_id, evid)) {
if (!trace_check(cpu_id)) {
return;
}
@@ -121,7 +121,7 @@ TRACE_4I(uint32_t evid, uint32_t a, uint32_t b, uint32_t c,
struct trace_entry entry;
uint16_t cpu_id = get_cpu_id();
if (!trace_check(cpu_id, evid)) {
if (!trace_check(cpu_id)) {
return;
}
@@ -139,7 +139,7 @@ TRACE_6C(uint32_t evid, uint8_t a1, uint8_t a2, uint8_t a3,
struct trace_entry entry;
uint16_t cpu_id = get_cpu_id();
if (!trace_check(cpu_id, evid)) {
if (!trace_check(cpu_id)) {
return;
}
@@ -163,7 +163,7 @@ TRACE_16STR(uint32_t evid, const char name[])
uint16_t cpu_id = get_cpu_id();
size_t len, i;
if (!trace_check(cpu_id, evid)) {
if (!trace_check(cpu_id)) {
return;
}