[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-10.0 v2 01/13] hw/pci: Do not declare PCIBus::flags mask as e
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-10.0 v2 01/13] hw/pci: Do not declare PCIBus::flags mask as enum |
Date: |
Tue, 26 Nov 2024 12:22:00 +0100 |
We use PCIBus::flags to mask various flags. It is not
an enum, and doing so confuses static analyzers. Rename
the enum as singular. Use a generic unsigned type for
the mask.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/pci/pci_bus.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h
index 22613125462..6ecfe2e06d5 100644
--- a/include/hw/pci/pci_bus.h
+++ b/include/hw/pci/pci_bus.h
@@ -19,7 +19,7 @@ struct PCIBusClass {
uint16_t (*numa_node)(PCIBus *bus);
};
-enum PCIBusFlags {
+enum PCIBusFlag {
/* This bus is the root of a PCI domain */
PCI_BUS_IS_ROOT = 0x0001,
/* PCIe extended configuration space is accessible on this bus */
@@ -32,7 +32,7 @@ enum PCIBusFlags {
struct PCIBus {
BusState qbus;
- enum PCIBusFlags flags;
+ unsigned flags;
const PCIIOMMUOps *iommu_ops;
void *iommu_opaque;
uint8_t devfn_min;
--
2.45.2
- [PATCH-for-10.0 v2 00/13] hw/boards: Remove legacy MachineClass::pci_allow_0_address flag, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 01/13] hw/pci: Do not declare PCIBus::flags mask as enum,
Philippe Mathieu-Daudé <=
- [PATCH-for-10.0 v2 02/13] hw/pci-bridge: Initialize bridge with parent bus flags, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 03/13] hw/pci: Factor machine_refuses_bar_at_addr_0() helper out, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 04/13] hw/pci: Introduce PCIBusFlag::PCI_BUS_BAR_AT_ADDR0_REFUSED, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 06/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_init(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 07/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_new(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 05/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_internal_init(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 09/13] hw/ppc/spapr: Create host bridge setting bar_at_addr_0_refused=false, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 08/13] hw/pci: Propagate bar_at_addr_0_refused to pci_register_root_bus(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 11/13] hw/arm/virt: Create GPEX host bridge without refuse-bar-at-addr-0, Philippe Mathieu-Daudé, 2024/11/26