mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-12 12:30:08 +00:00
HV:fix "Pointer param should be declared pointer to const"
Fix violations for function whose parameter can be read-only. Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -208,7 +208,7 @@ vioapic_update_tmr(struct vcpu *vcpu)
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
vioapic_indirect_read(struct acrn_vioapic *vioapic, uint32_t addr)
|
||||
vioapic_indirect_read(const struct acrn_vioapic *vioapic, uint32_t addr)
|
||||
{
|
||||
uint32_t regnum;
|
||||
uint32_t pin, pincount = vioapic_pincount(vioapic->vm);
|
||||
@@ -248,7 +248,7 @@ vioapic_indirect_read(struct acrn_vioapic *vioapic, uint32_t addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool vioapic_need_intr(struct acrn_vioapic *vioapic, uint16_t pin)
|
||||
static inline bool vioapic_need_intr(const struct acrn_vioapic *vioapic, uint16_t pin)
|
||||
{
|
||||
uint32_t lvl;
|
||||
union ioapic_rte rte;
|
||||
@@ -515,7 +515,7 @@ vioapic_init(struct vm *vm)
|
||||
}
|
||||
|
||||
void
|
||||
vioapic_cleanup(struct acrn_vioapic *vioapic)
|
||||
vioapic_cleanup(const struct acrn_vioapic *vioapic)
|
||||
{
|
||||
unregister_mmio_emulation_handler(vioapic->vm,
|
||||
(uint64_t)VIOAPIC_BASE,
|
||||
|
@@ -37,7 +37,7 @@
|
||||
|
||||
static void vpic_set_pinstate(struct acrn_vpic *vpic, uint8_t pin, uint8_t level);
|
||||
|
||||
static inline bool master_pic(struct acrn_vpic *vpic, struct i8259_reg_state *i8259)
|
||||
static inline bool master_pic(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259)
|
||||
{
|
||||
|
||||
if (i8259 == &vpic->i8259[0]) {
|
||||
@@ -47,7 +47,7 @@ static inline bool master_pic(struct acrn_vpic *vpic, struct i8259_reg_state *i8
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint8_t vpic_get_highest_isrpin(struct i8259_reg_state *i8259)
|
||||
static inline uint8_t vpic_get_highest_isrpin(const struct i8259_reg_state *i8259)
|
||||
{
|
||||
uint8_t bit, pin, i;
|
||||
|
||||
@@ -74,7 +74,7 @@ static inline uint8_t vpic_get_highest_isrpin(struct i8259_reg_state *i8259)
|
||||
return VPIC_INVALID_PIN;
|
||||
}
|
||||
|
||||
static inline uint8_t vpic_get_highest_irrpin(struct i8259_reg_state *i8259)
|
||||
static inline uint8_t vpic_get_highest_irrpin(const struct i8259_reg_state *i8259)
|
||||
{
|
||||
uint8_t serviced, bit, pin, tmp;
|
||||
|
||||
@@ -207,7 +207,7 @@ static void vpic_notify_intr(struct acrn_vpic *vpic)
|
||||
}
|
||||
}
|
||||
|
||||
static int vpic_icw1(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
static int vpic_icw1(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
{
|
||||
dev_dbg(ACRN_DBG_PIC, "vm 0x%x: i8259 icw1 0x%x\n",
|
||||
vpic->vm, val);
|
||||
@@ -237,7 +237,7 @@ static int vpic_icw1(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vpic_icw2(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
static int vpic_icw2(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
{
|
||||
dev_dbg(ACRN_DBG_PIC, "vm 0x%x: i8259 icw2 0x%x\n",
|
||||
vpic->vm, val);
|
||||
@@ -249,7 +249,7 @@ static int vpic_icw2(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vpic_icw3(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
static int vpic_icw3(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
{
|
||||
dev_dbg(ACRN_DBG_PIC, "vm 0x%x: i8259 icw3 0x%x\n",
|
||||
vpic->vm, val);
|
||||
@@ -259,7 +259,7 @@ static int vpic_icw3(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vpic_icw4(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
static int vpic_icw4(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
{
|
||||
dev_dbg(ACRN_DBG_PIC, "vm 0x%x: i8259 icw4 0x%x\n",
|
||||
vpic->vm, val);
|
||||
@@ -290,7 +290,7 @@ static int vpic_icw4(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vpic_ocw1(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
static int vpic_ocw1(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint8_t val)
|
||||
{
|
||||
uint8_t pin, i, bit;
|
||||
uint8_t old = i8259->mask;
|
||||
|
Reference in New Issue
Block a user