diff mbox series

[5/5] include/hw/pci: Include hw/pci/pci.h where needed

Message ID 20221209134802.3642942-6-armbru@redhat.com
State New
Headers show
Series include/hw/pci include/hw/cxl: Clean up includes | expand

Commit Message

Markus Armbruster Dec. 9, 2022, 1:48 p.m. UTC
hw/pci/pcie_sriov.h needs PCI_NUM_REGIONS.  Without the previous
commit, this would close an inclusion loop: hw/pci/pci.h used to
include hw/pci/pcie.h for PCIExpressDevice, which includes
pcie_sriov.h for PCIESriovPF, which now includes hw/pci/pci.h for
PCI_NUM_REGIONS.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 include/hw/pci/pcie_sriov.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Philippe Mathieu-Daudé Dec. 9, 2022, 2:17 p.m. UTC | #1
On 9/12/22 14:48, Markus Armbruster wrote:
> hw/pci/pcie_sriov.h needs PCI_NUM_REGIONS.  Without the previous
> commit, this would close an inclusion loop: hw/pci/pci.h used to
> include hw/pci/pcie.h for PCIExpressDevice, which includes
> pcie_sriov.h for PCIESriovPF, which now includes hw/pci/pci.h for
> PCI_NUM_REGIONS.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   include/hw/pci/pcie_sriov.h | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/include/hw/pci/pcie_sriov.h b/include/hw/pci/pcie_sriov.h
index 80f5c84e75..96cc743309 100644
--- a/include/hw/pci/pcie_sriov.h
+++ b/include/hw/pci/pcie_sriov.h
@@ -13,6 +13,8 @@ 
 #ifndef QEMU_PCIE_SRIOV_H
 #define QEMU_PCIE_SRIOV_H
 
+#include "hw/pci/pci.h"
+
 struct PCIESriovPF {
     uint16_t num_vfs;   /* Number of virtual functions created */
     uint8_t vf_bar_type[PCI_NUM_REGIONS];   /* Store type for each VF bar */