Skip to contentSkip to conversation

include/hw: Do not include hw.h from headers

PATCH In review Thomas Huth 3 participants 4 messages Feb 10, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/hw: Do not include hw.h from headers

This include is not needed here, so drop that line.

---
 include/hw/ssi/ibex_spi_host.h          | 1 -
 include/hw/tricore/tricore_testdevice.h | 1 -
 2 files changed, 2 deletions(-)
include/hw/ssi/ibex_spi_host.h +0 -1
index 8089cc1c31..5bd5557b9a 100644
@@ -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"
include/hw/tricore/tricore_testdevice.h +0 -1
index 1e2b8942ac..8b4fe15f24 100644
@@ -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) \
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Thomas Huth

This include is not needed here, so drop that line.

---
  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"
#2 lore raw
Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Thomas Huth

This include is not needed here, so drop that line.

---
  include/hw/ssi/ibex_spi_host.h          | 1 -
  include/hw/tricore/tricore_testdevice.h | 1 -

  2 files changed, 2 deletions(-)
Quoted 8 lines

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

Reviewed-by on v1 1/1
#3 lore raw
In reply to Thomas Huth

include/hw/ssi/ibex_spi_host.h

Quoted 10 lines · Thomas Huth

This include is not needed here, so drop that line.

---
 include/hw/ssi/ibex_spi_host.h          | 1 -
 include/hw/tricore/tricore_testdevice.h | 1 -
 2 files changed, 2 deletions(-)
include/hw/ssi/ibex_spi_host.h +0 -0
index 8089cc1c31..5bd5557b9a 100644

Cheers,
Bastian