Skip to contentSkip to conversation

Remove inclusion of hw/hw.h from files that don't need it

PATCH In review Thomas Huth 4 participants 4 messages Jul 1, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove inclusion of hw/hw.h from files that don't need it

hw/hw.h only contains the prototype of hw_error() nowadays, so files that don't use this function don't need to include this header.

---
 include/hw/misc/xlnx-cfi-if.h | 1 -
 hw/misc/edu.c                 | 1 -
 hw/vfio/container.c           | 1 -
 3 files changed, 3 deletions(-)
include/hw/misc/xlnx-cfi-if.h +0 -1
index f9bd12292d..5010401517 100644
@@ -11,7 +11,6 @@
 #define XLNX_CFI_IF_H 1
 
 #include "qemu/help-texts.h"
-#include "hw/hw.h"
 #include "qom/object.h"
 
 #define TYPE_XLNX_CFI_IF "xlnx-cfi-if"
hw/misc/edu.c +0 -1
index fa052c44db..504178b4a2 100644
@@ -26,7 +26,6 @@
 #include "qemu/log.h"
 #include "qemu/units.h"
 #include "hw/pci/pci.h"
-#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "qemu/timer.h"
 #include "qom/object.h"
hw/vfio/container.c +0 -1
index 2e7ecdf10e..88ede913d6 100644
@@ -26,7 +26,6 @@
 #include "exec/address-spaces.h"
 #include "exec/memory.h"
 #include "exec/ram_addr.h"
-#include "hw/hw.h"
 #include "qemu/error-report.h"
 #include "qemu/range.h"
 #include "sysemu/reset.h"
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 40 lines · Thomas Huth

hw/hw.h only contains the prototype of hw_error() nowadays, so files that don't use this function don't need to include this header.

---
  include/hw/misc/xlnx-cfi-if.h | 1 -
  hw/misc/edu.c                 | 1 -
  hw/vfio/container.c           | 1 -
  3 files changed, 3 deletions(-)
include/hw/misc/xlnx-cfi-if.h +0 -1
index f9bd12292d..5010401517 100644
@@ -11,7 +11,6 @@
  #define XLNX_CFI_IF_H 1
 
  #include "qemu/help-texts.h"
-#include "hw/hw.h"
  #include "qom/object.h"
 
  #define TYPE_XLNX_CFI_IF "xlnx-cfi-if"
hw/misc/edu.c +0 -1
index fa052c44db..504178b4a2 100644
@@ -26,7 +26,6 @@
  #include "qemu/log.h"
  #include "qemu/units.h"
  #include "hw/pci/pci.h"
-#include "hw/hw.h"
  #include "hw/pci/msi.h"
  #include "qemu/timer.h"
  #include "qom/object.h"
hw/vfio/container.c +0 -0
index 2e7ecdf10e..88ede913d6 100644

hw/vfio/container.c line 31

Quoted 7 lines
hw/vfio/container.c +0 -1
@@ -26,7 +26,6 @@
  #include "exec/address-spaces.h"
  #include "exec/memory.h"
  #include "exec/ram_addr.h"
-#include "hw/hw.h"
  #include "qemu/error-report.h"
  #include "qemu/range.h"
  #include "sysemu/reset.h"

Thanks,

C.