mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50: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:
@@ -123,8 +123,8 @@ void enable_disable_pci_intx(union pci_bdf bdf, bool enable)
|
||||
void pci_scan_bus(pci_enumeration_cb cb_func, void *cb_data)
|
||||
{
|
||||
union pci_bdf pbdf;
|
||||
uint8_t hdr_type, secondary_bus;
|
||||
uint32_t bus, dev, func, val;
|
||||
uint8_t hdr_type, secondary_bus, dev, func;
|
||||
uint32_t bus, val;
|
||||
uint8_t bus_to_scan[PCI_BUSMAX + 1] = { BUS_SCAN_SKIP };
|
||||
|
||||
/* start from bus 0 */
|
||||
@@ -136,7 +136,7 @@ void pci_scan_bus(pci_enumeration_cb cb_func, void *cb_data)
|
||||
}
|
||||
|
||||
bus_to_scan[bus] = BUS_SCAN_COMPLETE;
|
||||
pbdf.bits.b = bus;
|
||||
pbdf.bits.b = (uint8_t)bus;
|
||||
|
||||
for (dev = 0U; dev <= PCI_SLOTMAX; dev++) {
|
||||
pbdf.bits.d = dev;
|
||||
|
Reference in New Issue
Block a user