mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-02 17:34:27 +00:00
hv: fix type conversion violations
This patch fixes the following violations: 1. Implicit conversion: actual to formal param 2. Value is not of appropriate type 3. No cast for widening complex int expression 4. Widening cast on complex integer expression 5. Narrower int conversion without cast. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
|
||||
#define DEFAULT_DEST_MODE IOAPIC_RTE_DESTLOG
|
||||
#define DEFAULT_DELIVERY_MODE IOAPIC_RTE_DELLOPRI
|
||||
#define ALL_CPUS_MASK ((1U << phys_cpu_num) - 1U)
|
||||
#define ALL_CPUS_MASK ((1UL << (uint64_t)phys_cpu_num) - 1UL)
|
||||
|
||||
#define IRQ_ALLOC_BITMAP_SIZE INT_DIV_ROUNDUP(NR_IRQS, 64U)
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#define PAGE_H
|
||||
|
||||
#define PAGE_SHIFT 12U
|
||||
#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
||||
#define PAGE_SIZE (1U << PAGE_SHIFT)
|
||||
|
||||
/* size of the low MMIO address space: 2GB */
|
||||
#define PLATFORM_LO_MMIO_SIZE 0x80000000UL
|
||||
|
@@ -291,7 +291,7 @@ static inline uint8_t iommu_ecap_pds(uint64_t ecap)
|
||||
#define DMA_CCMD_DEVICE_INVL (3UL << 61U)
|
||||
static inline uint64_t dma_ccmd_fm(uint8_t fm)
|
||||
{
|
||||
return (((uint64_t)(fm & 0x3U)) << 32U);
|
||||
return (((uint64_t)fm & 0x3UL) << 32UL);
|
||||
}
|
||||
|
||||
#define DMA_CCMD_MASK_NOBIT 0UL
|
||||
@@ -300,7 +300,7 @@ static inline uint64_t dma_ccmd_fm(uint8_t fm)
|
||||
#define DMA_CCMD_MASK_3BIT 3UL
|
||||
static inline uint64_t dma_ccmd_sid(uint16_t sid)
|
||||
{
|
||||
return (((uint64_t)(sid & 0xffffU)) << 16U);
|
||||
return (((uint64_t)sid & 0xffffUL) << 16UL);
|
||||
}
|
||||
|
||||
static inline uint16_t dma_ccmd_did(uint16_t did)
|
||||
@@ -324,7 +324,7 @@ static inline uint8_t dma_ccmd_get_caig_32(uint32_t gaig)
|
||||
#define DMA_IOTLB_DW (((uint64_t)1UL) << 48U)
|
||||
static inline uint64_t dma_iotlb_did(uint16_t did)
|
||||
{
|
||||
return (((uint64_t)(did & 0xffffU)) << 32U);
|
||||
return (((uint64_t)did & 0xffffUL) << 32UL);
|
||||
}
|
||||
|
||||
static inline uint8_t dma_iotlb_get_iaig_32(uint32_t iai)
|
||||
|
Reference in New Issue
Block a user