From a1e081073f6f2f86222b1ce86032e461378eed3b Mon Sep 17 00:00:00 2001 From: Qian Wang Date: Thu, 26 Mar 2020 10:58:44 +0800 Subject: [PATCH] HV: Corrected return type of two static functions hv: vtd: corrected the return type of get_qi_queue and get_ir_table to void * Tracked-On: #4535 Signed-off-by: Qian Wang Reviewed-by: Binbin Wu Acked-by: Eddie Dong --- hypervisor/arch/x86/vtd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hypervisor/arch/x86/vtd.c b/hypervisor/arch/x86/vtd.c index 837a5c4f1..01c1149a7 100644 --- a/hypervisor/arch/x86/vtd.c +++ b/hypervisor/arch/x86/vtd.c @@ -167,16 +167,16 @@ static inline uint8_t *get_ctx_table(uint32_t dmar_index, uint8_t bus_no) /* * @pre dmar_index < CONFIG_MAX_IOMMU_NUM */ -static inline uint8_t *get_qi_queue(uint32_t dmar_index) +static inline void *get_qi_queue(uint32_t dmar_index) { static struct page qi_queues[CONFIG_MAX_IOMMU_NUM] __aligned(PAGE_SIZE); - return qi_queues[dmar_index].contents; + return (void *)qi_queues[dmar_index].contents; } -static inline uint8_t *get_ir_table(uint32_t dmar_index) +static inline void *get_ir_table(uint32_t dmar_index) { static struct intr_remap_table ir_tables[CONFIG_MAX_IOMMU_NUM] __aligned(PAGE_SIZE); - return ir_tables[dmar_index].tables[0].contents; + return (void *)ir_tables[dmar_index].tables[0].contents; } bool iommu_snoop_supported(const struct iommu_domain *iommu)