[PATCH] include/hw: Do not include hw.h from headers

Thomas Huth posted 1 patch 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230210112835.1117966-1-thuth@redhat.com
Maintainers: Alistair Francis <Alistair.Francis@wdc.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
include/hw/ssi/ibex_spi_host.h          | 1 -
include/hw/tricore/tricore_testdevice.h | 1 -
2 files changed, 2 deletions(-)
[PATCH] include/hw: Do not include hw.h from headers
Posted by Thomas Huth 1 year, 2 months ago
This include is not needed here, so drop that line.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/ssi/ibex_spi_host.h          | 1 -
 include/hw/tricore/tricore_testdevice.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/include/hw/ssi/ibex_spi_host.h b/include/hw/ssi/ibex_spi_host.h
index 8089cc1c31..5bd5557b9a 100644
--- a/include/hw/ssi/ibex_spi_host.h
+++ b/include/hw/ssi/ibex_spi_host.h
@@ -28,7 +28,6 @@
 #define IBEX_SPI_HOST_H
 
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/ssi/ssi.h"
 #include "qemu/fifo8.h"
 #include "qom/object.h"
diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h
index 1e2b8942ac..8b4fe15f24 100644
--- a/include/hw/tricore/tricore_testdevice.h
+++ b/include/hw/tricore/tricore_testdevice.h
@@ -19,7 +19,6 @@
 #define HW_TRICORE_TESTDEVICE_H
 
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 
 #define TYPE_TRICORE_TESTDEVICE "tricore_testdevice"
 #define TRICORE_TESTDEVICE(obj) \
-- 
2.31.1
Re: [PATCH] include/hw: Do not include hw.h from headers
Posted by Bastian Koppelmann 1 year, 2 months ago
On Fri, Feb 10, 2023 at 12:28:35PM +0100, Thomas Huth wrote:
> This include is not needed here, so drop that line.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  include/hw/ssi/ibex_spi_host.h          | 1 -
>  include/hw/tricore/tricore_testdevice.h | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/include/hw/ssi/ibex_spi_host.h b/include/hw/ssi/ibex_spi_host.h
> index 8089cc1c31..5bd5557b9a 100644

Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Cheers,
Bastian
Re: [PATCH] include/hw: Do not include hw.h from headers
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
On 10/2/23 12:28, Thomas Huth wrote:
> This include is not needed here, so drop that line.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   include/hw/ssi/ibex_spi_host.h          | 1 -
>   include/hw/tricore/tricore_testdevice.h | 1 -
>   2 files changed, 2 deletions(-)

Possibly more?

$ git grep hw/hw.h $(git grep -L -w hw_error)
hw/pci-host/mv64361.c:14:#include "hw/hw.h"
hw/ppc/pegasos2.c:13:#include "hw/hw.h"
hw/sensor/dps310.c:12:#include "hw/hw.h"
include/hw/ssi/ibex_spi_host.h:31:#include "hw/hw.h"
include/hw/tricore/tricore_testdevice.h:22:#include "hw/hw.h"

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


Re: [PATCH] include/hw: Do not include hw.h from headers
Posted by Thomas Huth 1 year, 2 months ago
On 10/02/2023 13.45, Philippe Mathieu-Daudé wrote:
> On 10/2/23 12:28, Thomas Huth wrote:
>> This include is not needed here, so drop that line.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   include/hw/ssi/ibex_spi_host.h          | 1 -
>>   include/hw/tricore/tricore_testdevice.h | 1 -
>>   2 files changed, 2 deletions(-)
> 
> Possibly more?
> 
> $ git grep hw/hw.h $(git grep -L -w hw_error)
> hw/pci-host/mv64361.c:14:#include "hw/hw.h"
> hw/ppc/pegasos2.c:13:#include "hw/hw.h"
> hw/sensor/dps310.c:12:#include "hw/hw.h"
> include/hw/ssi/ibex_spi_host.h:31:#include "hw/hw.h"
> include/hw/tricore/tricore_testdevice.h:22:#include "hw/hw.h"

Oh, I only looked at the headers in include/ ... but you're right, these 
other files also don't need it. Thanks, I'll send a v2.

  Thomas