qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/5] include/hw/cxl: Break inclusion loop


From: Markus Armbruster
Subject: Re: [PATCH 6/5] include/hw/cxl: Break inclusion loop
Date: Sat, 10 Dec 2022 08:09:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Markus Armbruster <armbru@redhat.com> writes:

> hw/cxl/cxl_pci.h and hw/cxl/cxl_cdat.h include each other.  Neither
> header actually needs the other one.  Drop both #include directives.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  include/hw/cxl/cxl_cdat.h | 1 -
>  include/hw/cxl/cxl_pci.h  | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/include/hw/cxl/cxl_cdat.h b/include/hw/cxl/cxl_cdat.h
> index 7f67638685..e3fd737f9d 100644
> --- a/include/hw/cxl/cxl_cdat.h
> +++ b/include/hw/cxl/cxl_cdat.h
> @@ -10,7 +10,6 @@
>  #ifndef CXL_CDAT_H
>  #define CXL_CDAT_H
>  
> -#include "hw/cxl/cxl_pci.h"
>  #include "hw/pci/pcie_doe.h"
>  
>  /*
> diff --git a/include/hw/cxl/cxl_pci.h b/include/hw/cxl/cxl_pci.h
> index aca14845ab..01e15ed5b4 100644
> --- a/include/hw/cxl/cxl_pci.h
> +++ b/include/hw/cxl/cxl_pci.h
> @@ -11,7 +11,6 @@
>  #define CXL_PCI_H
>  
>  #include "qemu/compiler.h"
> -#include "hw/cxl/cxl_cdat.h"
>  
>  #define CXL_VENDOR_ID 0x1e98

Friday afternoon post with insufficient testing...  Everything still
builds fine, but cxl_component.h is no longer self-contained.  I'll
squash in the appended patch and revise the commit message.


diff --git a/include/hw/cxl/cxl_component.h b/include/hw/cxl/cxl_component.h
index 5dca21e95b..78f83ed742 100644
--- a/include/hw/cxl/cxl_component.h
+++ b/include/hw/cxl/cxl_component.h
@@ -19,6 +19,7 @@
 #include "qemu/range.h"
 #include "qemu/typedefs.h"
 #include "hw/cxl/cxl_cdat.h"
+#include "hw/cxl/cxl_pci.h"
 #include "hw/register.h"
 #include "qapi/error.h"
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]