mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 04:39:34 +00:00
hv: minor cleanup for dm/vpci code
- It makes more sense to return bool from pci_bar_access() - other minor changes for cleanup Tracked-On: #1568 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Signed-off-by: Zide Chen <zide.chen@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -144,16 +144,16 @@ enum pci_bar_type {
|
||||
|
||||
static inline uint32_t pci_bar_offset(uint32_t idx)
|
||||
{
|
||||
return 0x10U + (idx << 2U);
|
||||
return PCIR_BARS + (idx << 2U);
|
||||
}
|
||||
|
||||
static inline int pci_bar_access(uint32_t offset)
|
||||
static inline bool pci_bar_access(uint32_t offset)
|
||||
{
|
||||
if ((offset >= pci_bar_offset(0U))
|
||||
&& (offset < pci_bar_offset(PCI_BAR_COUNT))) {
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user