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:
Huihuang Shi
2018-10-23 11:45:29 +08:00
committed by wenlingz
parent d79007ae70
commit ea32c34ae1
39 changed files with 149 additions and 149 deletions

View File

@@ -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,