Skip to content

Commit 7cc8566

Browse files
shiqinggwenlingz
authored andcommitted
hv: fixes related to unused API and uninitialized variable
This patch does: - remove the unused API declaration - fix use of uninitialized variable in instr_emul.c Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent f0d3f1c commit 7cc8566

File tree

5 files changed

+1
-13
lines changed

5 files changed

+1
-13
lines changed

hypervisor/arch/x86/guest/instr_emul.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ static int emulate_or(struct acrn_vcpu *vcpu, const struct instr_emul_vie *vie)
13351335

13361336
static int emulate_cmp(struct acrn_vcpu *vcpu, const struct instr_emul_vie *vie)
13371337
{
1338-
int error;
1338+
int error = 0;
13391339
uint8_t size;
13401340
uint64_t regop, memop, op1, op2, rflags2;
13411341
enum cpu_reg_name reg;

hypervisor/include/arch/x86/irq.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ struct smp_call_info_data {
7474
};
7575

7676
void smp_call_function(uint64_t mask, smp_call_func_t func, void *data);
77-
int handle_level_interrupt_common(struct irq_desc *desc,
78-
__unused void *handler_data);
79-
int common_handler_edge(struct irq_desc *desc, __unused void *handler_data);
80-
int common_dev_handler_level(struct irq_desc *desc,
81-
__unused void *handler_data);
82-
int quick_handler_nolock(struct irq_desc *desc, __unused void *handler_data);
8377

8478
void init_default_irqs(uint16_t cpu_id);
8579

hypervisor/include/arch/x86/vmexit.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,4 @@ static inline uint64_t vm_exit_io_instruction_port_number(uint64_t exit_qual)
8484
return (vm_exit_qualification_bit_mask(exit_qual, 31U, 16U) >> 16U);
8585
}
8686

87-
#ifdef HV_DEBUG
88-
void get_vmexit_profile(char *str_arg, size_t str_max);
89-
#endif /* HV_DEBUG */
90-
9187
#endif /* VMEXIT_H_ */

hypervisor/include/debug/logmsg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ void asm_assert(int32_t line, const char *file, const char *txt);
4848
#endif /* HV_DEBUG */
4949

5050
void init_logmsg(uint32_t flags);
51-
void print_logmsg_buffer(uint16_t pcpu_id);
5251
void do_logmsg(uint32_t severity, const char *fmt, ...);
5352

5453
/** The well known printf() function.

hypervisor/release/logmsg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@
88

99
void init_logmsg(__unused uint32_t flags) {}
1010
void do_logmsg(__unused uint32_t severity, __unused const char *fmt, ...) {}
11-
void print_logmsg_buffer(__unused uint16_t pcpu_id) {}
1211
void printf(__unused const char *fmt, ...) {}
1312
void vprintf(__unused const char *fmt, __unused va_list args) {}

0 commit comments

Comments
 (0)