mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 12:19:06 +00:00
hv: fix 'Procedure is not called or referenced in code analysed'
MISRA-C requires that each function defined and declared shall be called or referenced in code analyzed. In some cases, we would like to keep the non-called functions for code completeness, such as vcpu_inject_extint/vcpu_inject_nmi/vcpu_inject_gp/vcpu_inject_pf /vcpu_inject_ud/vcpu_inject_ac/vcpu_inject_ss. This pacth removes some functions that are independent and are not called in our code base. 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:
@@ -305,27 +305,6 @@ static int vpic_icw4(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool vpic_is_pin_mask(struct acrn_vpic *vpic, uint8_t virt_pin_arg)
|
||||
{
|
||||
struct i8259_reg_state *i8259;
|
||||
uint8_t virt_pin = virt_pin_arg;
|
||||
|
||||
if (virt_pin < 8U) {
|
||||
i8259 = &vpic->i8259[0];
|
||||
} else if (virt_pin < 16U) {
|
||||
i8259 = &vpic->i8259[1];
|
||||
virt_pin -= 8U;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((i8259->mask & (1U << virt_pin)) != 0U) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static int vpic_ocw1(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
{
|
||||
uint8_t pin, i, bit;
|
||||
|
Reference in New Issue
Block a user