Do not include hw/hw.h if it is not necessary
PATCH v2 1/1 Do not include hw/hw.h if it is not necessary
hw.h only contains the protoype of one function nowadays, hw_error(), so all files that do not use this function anymore also do not need to include this header anymore.
Signed-off-by Thomas Huth <[email protected]>
---
v2:
- Add .c files, too (thanks to Philippe for the hint)
- Changed the subject of the patch (was: "Do not include hw.h from headers")
include/hw/ssi/ibex_spi_host.h | 1 - include/hw/tricore/tricore_testdevice.h | 1 - hw/pci-host/mv64361.c | 1 - hw/ppc/pegasos2.c | 1 - hw/sensor/dps310.c | 1 - 5 files changed, 5 deletions(-)
include/hw/ssi/ibex_spi_host.h +0 -1
@@ -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
@@ -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) \
hw/pci-host/mv64361.c +0 -1
@@ -11,7 +11,6 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "hw/hw.h" #include "hw/sysbus.h" #include "hw/pci/pci_device.h" #include "hw/pci/pci_host.h"
hw/ppc/pegasos2.c +0 -1
@@ -10,7 +10,6 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "hw/hw.h" #include "hw/ppc/ppc.h" #include "hw/sysbus.h" #include "hw/pci/pci_host.h"
hw/sensor/dps310.c +0 -1
@@ -9,7 +9,6 @@#include "qemu/osdep.h" #include "qemu/log.h" -#include "hw/hw.h" #include "hw/i2c/i2c.h" #include "qapi/error.h" #include "qapi/visitor.h"
Signature · 1 line
2.31.1
Quoted 10 lines · Thomas Huth
hw.honly contains the protoype of one function nowadays,hw_error(), so all files that do not use this function anymore also do not need to include this header anymore.Signed-off-by Thomas Huth <[email protected]>---
v2:
- Add .c files, too (thanks to Philippe for the hint)
- Changed the subject of the patch (was: "Do not includehw.hfrom headers")
Quoted 6 lines
include/hw/ssi/ibex_spi_host.h | 1 - include/hw/tricore/tricore_testdevice.h | 1 - hw/pci-host/mv64361.c | 1 - hw/ppc/pegasos2.c | 1 - hw/sensor/dps310.c | 1 - 5 files changed, 5 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>