All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Clean up includes
@ 2024-01-25 16:33 Peter Maydell
  2024-01-25 16:33 ` [PATCH 01/10] scripts/clean-includes: Update exclude list Peter Maydell
                   ` (10 more replies)
  0 siblings, 11 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This series makes a bunch of automated edits with the clean-includes
script. The script performs three related cleanups:

 * Ensure .c files include qemu/osdep.h first.
 * Including it in a .h is redundant, since the .c  already includes
   it.  Drop such inclusions.
 * Likewise, including headers qemu/osdep.h includes is redundant.
   Drop these, too.

I created the series by looking at a run of the script across the
whole tree (./scripts/clean-includes --git includes --all) produces,
and then disentangling that into (a) different cohesive parts and (b)
files that needed to go into the script's exclude-list.

After this series, the tree is still not entirely clean -- there
are 20 other files the script wants to change. But at least some
of them are things that should be on the exclude list, and some
are things which I didn't feel like taking the time to try to
decide whether they should be fixed or excluded. I might come
back to these at some later date, but I figured this series was
enough to be going on with.

thanks
-- PMM

Peter Maydell (10):
  scripts/clean-includes: Update exclude list
  hyperv: Clean up includes
  disas/riscv: Clean up includes
  aspeed: Clean up includes
  acpi: Clean up includes
  m68k: Clean up includes
  include: Clean up includes
  cxl: Clean up includes
  riscv: Clean up includes
  misc: Clean up includes

 disas/riscv.h                             | 1 -
 hw/arm/aspeed_eeprom.h                    | 1 -
 hw/hyperv/hv-balloon-internal.h           | 1 -
 hw/hyperv/hv-balloon-our_range_memslots.h | 1 -
 hw/hyperv/hv-balloon-page_range_tree.h    | 1 -
 include/hw/arm/raspberrypi-fw-defs.h      | 1 -
 include/hw/audio/asc.h                    | 1 -
 include/hw/m68k/q800-glue.h               | 1 -
 include/hw/mem/memory-device.h            | 1 -
 include/hw/nvram/fw_cfg_acpi.h            | 1 -
 include/hw/ppc/spapr_nested.h             | 1 -
 include/hw/virtio/virtio-acpi.h           | 1 -
 include/hw/xen/xen-hvm-common.h           | 1 -
 include/qemu/qtree.h                      | 1 -
 include/ui/rect.h                         | 2 --
 target/riscv/vector_internals.h           | 1 -
 tests/qtest/qtest_aspeed.h                | 2 --
 audio/pwaudio.c                           | 1 -
 disas/riscv-xthead.c                      | 1 +
 disas/riscv-xventana.c                    | 1 +
 hw/arm/aspeed_eeprom.c                    | 1 +
 hw/cxl/cxl-events.c                       | 4 +---
 hw/hyperv/hv-balloon-our_range_memslots.c | 1 +
 hw/hyperv/hv-balloon-page_range_tree.c    | 1 +
 hw/hyperv/hv-balloon.c                    | 1 +
 hw/nvram/fw_cfg-acpi.c                    | 1 +
 hw/virtio/virtio-acpi.c                   | 1 +
 net/af-xdp.c                              | 1 -
 plugins/core.c                            | 1 -
 plugins/loader.c                          | 1 -
 target/riscv/vector_internals.c           | 1 +
 util/userfaultfd.c                        | 1 -
 scripts/clean-includes                    | 2 +-
 33 files changed, 11 insertions(+), 28 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 01/10] scripts/clean-includes: Update exclude list
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
@ 2024-01-25 16:33 ` Peter Maydell
  2024-01-25 16:34 ` [PATCH 02/10] hyperv: Clean up includes Peter Maydell
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Update the exclude list to exclude some more files which don't follow our
standard #include policy.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 scripts/clean-includes | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/clean-includes b/scripts/clean-includes
index 58e1607a82e..bdbf4040240 100755
--- a/scripts/clean-includes
+++ b/scripts/clean-includes
@@ -51,7 +51,7 @@ GIT=no
 DUPHEAD=no
 
 # Extended regular expression defining files to ignore when using --all
-XDIRREGEX='^(tests/tcg|tests/multiboot|pc-bios)'
+XDIRREGEX='^(tests/tcg|tests/multiboot|tests/fp|tests/plugin|tests/uefi-test-tools|pc-bios|subprojects|contrib/plugins|tools/ebpf|ebpf/rss.bpf.skeleton.h|linux-user/(mips64|x86_64)/(cpu_loop|signal).c)'
 
 while true
 do
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 02/10] hyperv: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
  2024-01-25 16:33 ` [PATCH 01/10] scripts/clean-includes: Update exclude list Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-26 15:45   ` Zhao Liu
  2024-01-27  5:04   ` Richard Henderson
  2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git hyperv hw/hyperv/*.[ch]

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/hyperv/hv-balloon-internal.h           | 1 -
 hw/hyperv/hv-balloon-our_range_memslots.h | 1 -
 hw/hyperv/hv-balloon-page_range_tree.h    | 1 -
 hw/hyperv/hv-balloon-our_range_memslots.c | 1 +
 hw/hyperv/hv-balloon-page_range_tree.c    | 1 +
 hw/hyperv/hv-balloon.c                    | 1 +
 6 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/hyperv/hv-balloon-internal.h b/hw/hyperv/hv-balloon-internal.h
index 164c2e58253..ee53a28a266 100644
--- a/hw/hyperv/hv-balloon-internal.h
+++ b/hw/hyperv/hv-balloon-internal.h
@@ -10,7 +10,6 @@
 #ifndef HW_HYPERV_HV_BALLOON_INTERNAL_H
 #define HW_HYPERV_HV_BALLOON_INTERNAL_H
 
-#include "qemu/osdep.h"
 
 #define HV_BALLOON_PFN_SHIFT 12
 #define HV_BALLOON_PAGE_SIZE (1 << HV_BALLOON_PFN_SHIFT)
diff --git a/hw/hyperv/hv-balloon-our_range_memslots.h b/hw/hyperv/hv-balloon-our_range_memslots.h
index b6f592d34b0..df3b686bc7c 100644
--- a/hw/hyperv/hv-balloon-our_range_memslots.h
+++ b/hw/hyperv/hv-balloon-our_range_memslots.h
@@ -10,7 +10,6 @@
 #ifndef HW_HYPERV_HV_BALLOON_OUR_RANGE_MEMSLOTS_H
 #define HW_HYPERV_HV_BALLOON_OUR_RANGE_MEMSLOTS_H
 
-#include "qemu/osdep.h"
 
 #include "exec/memory.h"
 #include "qom/object.h"
diff --git a/hw/hyperv/hv-balloon-page_range_tree.h b/hw/hyperv/hv-balloon-page_range_tree.h
index 07a9ae0da61..333772b86d2 100644
--- a/hw/hyperv/hv-balloon-page_range_tree.h
+++ b/hw/hyperv/hv-balloon-page_range_tree.h
@@ -10,7 +10,6 @@
 #ifndef HW_HYPERV_HV_BALLOON_PAGE_RANGE_TREE_H
 #define HW_HYPERV_HV_BALLOON_PAGE_RANGE_TREE_H
 
-#include "qemu/osdep.h"
 
 /* PageRange */
 typedef struct PageRange {
diff --git a/hw/hyperv/hv-balloon-our_range_memslots.c b/hw/hyperv/hv-balloon-our_range_memslots.c
index 99bae870f37..1505a395cf7 100644
--- a/hw/hyperv/hv-balloon-our_range_memslots.c
+++ b/hw/hyperv/hv-balloon-our_range_memslots.c
@@ -7,6 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include "hv-balloon-internal.h"
 #include "hv-balloon-our_range_memslots.h"
 #include "trace.h"
diff --git a/hw/hyperv/hv-balloon-page_range_tree.c b/hw/hyperv/hv-balloon-page_range_tree.c
index e178d8b413c..dfb14852f42 100644
--- a/hw/hyperv/hv-balloon-page_range_tree.c
+++ b/hw/hyperv/hv-balloon-page_range_tree.c
@@ -7,6 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include "hv-balloon-internal.h"
 #include "hv-balloon-page_range_tree.h"
 
diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c
index 66f297c1d7e..02383657124 100644
--- a/hw/hyperv/hv-balloon.c
+++ b/hw/hyperv/hv-balloon.c
@@ -7,6 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 
+#include "qemu/osdep.h"
 #include "hv-balloon-internal.h"
 
 #include "exec/address-spaces.h"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 03/10] disas/riscv: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
  2024-01-25 16:33 ` [PATCH 01/10] scripts/clean-includes: Update exclude list Peter Maydell
  2024-01-25 16:34 ` [PATCH 02/10] hyperv: Clean up includes Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-25 16:59   ` Philippe Mathieu-Daudé
                     ` (3 more replies)
  2024-01-25 16:34 ` [PATCH 04/10] aspeed: " Peter Maydell
                   ` (7 subsequent siblings)
  10 siblings, 4 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git disas/riscv disas/riscv*[ch]

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 disas/riscv.h          | 1 -
 disas/riscv-xthead.c   | 1 +
 disas/riscv-xventana.c | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/disas/riscv.h b/disas/riscv.h
index 19e5ed2ce63..16a08e4895c 100644
--- a/disas/riscv.h
+++ b/disas/riscv.h
@@ -7,7 +7,6 @@
 #ifndef DISAS_RISCV_H
 #define DISAS_RISCV_H
 
-#include "qemu/osdep.h"
 #include "target/riscv/cpu_cfg.h"
 
 /* types */
diff --git a/disas/riscv-xthead.c b/disas/riscv-xthead.c
index 99da679d16c..fcca326d1c3 100644
--- a/disas/riscv-xthead.c
+++ b/disas/riscv-xthead.c
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
+#include "qemu/osdep.h"
 #include "disas/riscv.h"
 #include "disas/riscv-xthead.h"
 
diff --git a/disas/riscv-xventana.c b/disas/riscv-xventana.c
index a0224d1fb31..cd694f15f32 100644
--- a/disas/riscv-xventana.c
+++ b/disas/riscv-xventana.c
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
+#include "qemu/osdep.h"
 #include "disas/riscv.h"
 #include "disas/riscv-xventana.h"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 04/10] aspeed: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (2 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-25 16:59   ` Philippe Mathieu-Daudé
                     ` (2 more replies)
  2024-01-25 16:34 ` [PATCH 05/10] acpi: " Peter Maydell
                   ` (6 subsequent siblings)
  10 siblings, 3 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes.

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/aspeed_eeprom.h     | 1 -
 tests/qtest/qtest_aspeed.h | 2 --
 hw/arm/aspeed_eeprom.c     | 1 +
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
index bbf9e54365b..f08c16ef506 100644
--- a/hw/arm/aspeed_eeprom.h
+++ b/hw/arm/aspeed_eeprom.h
@@ -7,7 +7,6 @@
 #ifndef ASPEED_EEPROM_H
 #define ASPEED_EEPROM_H
 
-#include "qemu/osdep.h"
 
 extern const uint8_t tiogapass_bmc_fruid[];
 extern const size_t tiogapass_bmc_fruid_len;
diff --git a/tests/qtest/qtest_aspeed.h b/tests/qtest/qtest_aspeed.h
index 235dfaa186a..d35b0c7cba5 100644
--- a/tests/qtest/qtest_aspeed.h
+++ b/tests/qtest/qtest_aspeed.h
@@ -12,8 +12,6 @@
 #ifndef QTEST_ASPEED_H
 #define QTEST_ASPEED_H
 
-#include <stdint.h>
-
 #include "libqtest.h"
 
 #define AST2600_ASPEED_I2C_BASE_ADDR 0x1e78a000
diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
index ace5266cec9..daa3d329d10 100644
--- a/hw/arm/aspeed_eeprom.c
+++ b/hw/arm/aspeed_eeprom.c
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier: GPL-2.0-only
  */
 
+#include "qemu/osdep.h"
 #include "aspeed_eeprom.h"
 
 /* Tiogapass BMC FRU */
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 05/10] acpi: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (3 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 04/10] aspeed: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-25 17:01   ` Philippe Mathieu-Daudé
                     ` (2 more replies)
  2024-01-25 16:34 ` [PATCH 06/10] m68k: " Peter Maydell
                   ` (5 subsequent siblings)
  10 siblings, 3 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git acpi include/hw/*/*acpi.h hw/*/*acpi.c

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/hw/nvram/fw_cfg_acpi.h  | 1 -
 include/hw/virtio/virtio-acpi.h | 1 -
 hw/nvram/fw_cfg-acpi.c          | 1 +
 hw/virtio/virtio-acpi.c         | 1 +
 4 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/hw/nvram/fw_cfg_acpi.h b/include/hw/nvram/fw_cfg_acpi.h
index b6553d86fcb..b39eb0490ff 100644
--- a/include/hw/nvram/fw_cfg_acpi.h
+++ b/include/hw/nvram/fw_cfg_acpi.h
@@ -7,7 +7,6 @@
 #ifndef FW_CFG_ACPI_H
 #define FW_CFG_ACPI_H
 
-#include "qemu/osdep.h"
 #include "exec/hwaddr.h"
 
 void fw_cfg_acpi_dsdt_add(Aml *scope, const MemMapEntry *fw_cfg_memmap);
diff --git a/include/hw/virtio/virtio-acpi.h b/include/hw/virtio/virtio-acpi.h
index 844e102569e..cace2a315f4 100644
--- a/include/hw/virtio/virtio-acpi.h
+++ b/include/hw/virtio/virtio-acpi.h
@@ -6,7 +6,6 @@
 #ifndef VIRTIO_ACPI_H
 #define VIRTIO_ACPI_H
 
-#include "qemu/osdep.h"
 #include "exec/hwaddr.h"
 
 void virtio_acpi_dsdt_add(Aml *scope, const hwaddr virtio_mmio_base,
diff --git a/hw/nvram/fw_cfg-acpi.c b/hw/nvram/fw_cfg-acpi.c
index 4e48baeaa01..58cdcd3121c 100644
--- a/hw/nvram/fw_cfg-acpi.c
+++ b/hw/nvram/fw_cfg-acpi.c
@@ -4,6 +4,7 @@
  *
  */
 
+#include "qemu/osdep.h"
 #include "hw/nvram/fw_cfg_acpi.h"
 #include "hw/acpi/aml-build.h"
 
diff --git a/hw/virtio/virtio-acpi.c b/hw/virtio/virtio-acpi.c
index e18cb38bdbe..230a6695001 100644
--- a/hw/virtio/virtio-acpi.c
+++ b/hw/virtio/virtio-acpi.c
@@ -4,6 +4,7 @@
  *
  */
 
+#include "qemu/osdep.h"
 #include "hw/virtio/virtio-acpi.h"
 #include "hw/acpi/aml-build.h"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 06/10] m68k: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (4 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 05/10] acpi: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
                     ` (2 more replies)
  2024-01-25 16:34 ` [PATCH 07/10] include: " Peter Maydell
                   ` (4 subsequent siblings)
  10 siblings, 3 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
./scripts/clean-includes --git m68k include/hw/audio/asc.h include/hw/m68k/*.h

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/hw/audio/asc.h      | 1 -
 include/hw/m68k/q800-glue.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/include/hw/audio/asc.h b/include/hw/audio/asc.h
index 4741f92c461..04fac270b6a 100644
--- a/include/hw/audio/asc.h
+++ b/include/hw/audio/asc.h
@@ -13,7 +13,6 @@
 #ifndef HW_AUDIO_ASC_H
 #define HW_AUDIO_ASC_H
 
-#include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "audio/audio.h"
 
diff --git a/include/hw/m68k/q800-glue.h b/include/hw/m68k/q800-glue.h
index ceb916d16c1..04fac25f6c2 100644
--- a/include/hw/m68k/q800-glue.h
+++ b/include/hw/m68k/q800-glue.h
@@ -23,7 +23,6 @@
 #ifndef HW_Q800_GLUE_H
 #define HW_Q800_GLUE_H
 
-#include "qemu/osdep.h"
 #include "hw/sysbus.h"
 
 #define TYPE_GLUE "q800-glue"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 07/10] include: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (5 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 06/10] m68k: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-26 15:43   ` Zhao Liu
  2024-01-25 16:34 ` [PATCH 08/10] cxl: " Peter Maydell
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git include include/*/*.h include/*/*/*.h

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I hand-checked that all these headers are included only by .c
files which already have osdep.h included.
---
 include/hw/arm/raspberrypi-fw-defs.h | 1 -
 include/hw/mem/memory-device.h       | 1 -
 include/hw/ppc/spapr_nested.h        | 1 -
 include/hw/xen/xen-hvm-common.h      | 1 -
 include/qemu/qtree.h                 | 1 -
 include/ui/rect.h                    | 2 --
 6 files changed, 7 deletions(-)

diff --git a/include/hw/arm/raspberrypi-fw-defs.h b/include/hw/arm/raspberrypi-fw-defs.h
index 4551fe7450d..579cf0d5546 100644
--- a/include/hw/arm/raspberrypi-fw-defs.h
+++ b/include/hw/arm/raspberrypi-fw-defs.h
@@ -10,7 +10,6 @@
 #ifndef INCLUDE_HW_MISC_RASPBERRYPI_FW_DEFS_H_
 #define INCLUDE_HW_MISC_RASPBERRYPI_FW_DEFS_H_
 
-#include "qemu/osdep.h"
 
 enum rpi_firmware_property_tag {
     RPI_FWREQ_PROPERTY_END =                           0,
diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
index a1d62cc551a..e0571c8a319 100644
--- a/include/hw/mem/memory-device.h
+++ b/include/hw/mem/memory-device.h
@@ -14,7 +14,6 @@
 #define MEMORY_DEVICE_H
 
 #include "hw/qdev-core.h"
-#include "qemu/typedefs.h"
 #include "qapi/qapi-types-machine.h"
 #include "qom/object.h"
 
diff --git a/include/hw/ppc/spapr_nested.h b/include/hw/ppc/spapr_nested.h
index d3834864764..d312a5d61da 100644
--- a/include/hw/ppc/spapr_nested.h
+++ b/include/hw/ppc/spapr_nested.h
@@ -1,7 +1,6 @@
 #ifndef HW_SPAPR_NESTED_H
 #define HW_SPAPR_NESTED_H
 
-#include "qemu/osdep.h"
 #include "target/ppc/cpu.h"
 
 /*
diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h
index 4e9904f1a65..4b1d728f35c 100644
--- a/include/hw/xen/xen-hvm-common.h
+++ b/include/hw/xen/xen-hvm-common.h
@@ -1,7 +1,6 @@
 #ifndef HW_XEN_HVM_COMMON_H
 #define HW_XEN_HVM_COMMON_H
 
-#include "qemu/osdep.h"
 #include "qemu/units.h"
 
 #include "cpu.h"
diff --git a/include/qemu/qtree.h b/include/qemu/qtree.h
index 69fe74b50d0..dc2b14d2582 100644
--- a/include/qemu/qtree.h
+++ b/include/qemu/qtree.h
@@ -42,7 +42,6 @@
 #ifndef QEMU_QTREE_H
 #define QEMU_QTREE_H
 
-#include "qemu/osdep.h"
 
 #ifdef HAVE_GLIB_WITH_SLICE_ALLOCATOR
 
diff --git a/include/ui/rect.h b/include/ui/rect.h
index 68f05d78a8e..7ebf47ebcdc 100644
--- a/include/ui/rect.h
+++ b/include/ui/rect.h
@@ -4,8 +4,6 @@
 #ifndef QEMU_RECT_H
 #define QEMU_RECT_H
 
-#include <stdint.h>
-#include <stdbool.h>
 
 typedef struct QemuRect {
     int16_t x;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 08/10] cxl: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (6 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 07/10] include: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
                     ` (2 more replies)
  2024-01-25 16:34 ` [PATCH 09/10] riscv: " Peter Maydell
                   ` (2 subsequent siblings)
  10 siblings, 3 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes.

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/cxl/cxl-events.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/cxl/cxl-events.c b/hw/cxl/cxl-events.c
index bee6dfaf148..affcf8a34dd 100644
--- a/hw/cxl/cxl-events.c
+++ b/hw/cxl/cxl-events.c
@@ -7,11 +7,9 @@
  * COPYING file in the top-level directory.
  */
 
-#include <stdint.h>
-
 #include "qemu/osdep.h"
+
 #include "qemu/bswap.h"
-#include "qemu/typedefs.h"
 #include "qemu/error-report.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 09/10] riscv: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (7 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 08/10] cxl: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
                     ` (2 more replies)
  2024-01-25 16:34 ` [PATCH 10/10] misc: " Peter Maydell
  2024-01-27  5:53 ` [PATCH 00/10] " Michael Tokarev
  10 siblings, 3 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git riscv target/riscv/*.[ch]

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target/riscv/vector_internals.h | 1 -
 target/riscv/vector_internals.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
index 8133111e5f6..842765f6c16 100644
--- a/target/riscv/vector_internals.h
+++ b/target/riscv/vector_internals.h
@@ -19,7 +19,6 @@
 #ifndef TARGET_RISCV_VECTOR_INTERNALS_H
 #define TARGET_RISCV_VECTOR_INTERNALS_H
 
-#include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "cpu.h"
 #include "tcg/tcg-gvec-desc.h"
diff --git a/target/riscv/vector_internals.c b/target/riscv/vector_internals.c
index 9cf5c17cdea..12f5964fbbe 100644
--- a/target/riscv/vector_internals.c
+++ b/target/riscv/vector_internals.c
@@ -16,6 +16,7 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "qemu/osdep.h"
 #include "vector_internals.h"
 
 /* set agnostic elements to 1s */
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 10/10] misc: Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (8 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 09/10] riscv: " Peter Maydell
@ 2024-01-25 16:34 ` Peter Maydell
  2024-01-26 15:47   ` Zhao Liu
  2024-01-27  5:53 ` [PATCH 00/10] " Michael Tokarev
  10 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2024-01-25 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git misc net/af-xdp.c plugins/*.c audio/pwaudio.c util/userfaultfd.c

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
These are all cases where files include things osdep already gives them.
---
 audio/pwaudio.c    | 1 -
 net/af-xdp.c       | 1 -
 plugins/core.c     | 1 -
 plugins/loader.c   | 1 -
 util/userfaultfd.c | 1 -
 5 files changed, 5 deletions(-)

diff --git a/audio/pwaudio.c b/audio/pwaudio.c
index 3ce5f6507b4..3b14e04fbb0 100644
--- a/audio/pwaudio.c
+++ b/audio/pwaudio.c
@@ -11,7 +11,6 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "audio.h"
-#include <errno.h>
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include <spa/param/audio/format-utils.h>
diff --git a/net/af-xdp.c b/net/af-xdp.c
index 6c65028fb00..38e600703a3 100644
--- a/net/af-xdp.c
+++ b/net/af-xdp.c
@@ -13,7 +13,6 @@
 
 #include "qemu/osdep.h"
 #include <bpf/bpf.h>
-#include <inttypes.h>
 #include <linux/if_link.h>
 #include <linux/if_xdp.h>
 #include <net/if.h>
diff --git a/plugins/core.c b/plugins/core.c
index 49588285dd0..ee2fa41af9e 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -27,7 +27,6 @@
 #include "tcg/tcg.h"
 #include "tcg/tcg-op.h"
 #include "plugin.h"
-#include "qemu/compiler.h"
 
 struct qemu_plugin_cb {
     struct qemu_plugin_ctx *ctx;
diff --git a/plugins/loader.c b/plugins/loader.c
index 734c11cae04..9768b78eb6b 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -33,7 +33,6 @@
 #ifndef CONFIG_USER_ONLY
 #include "hw/boards.h"
 #endif
-#include "qemu/compiler.h"
 
 #include "plugin.h"
 
diff --git a/util/userfaultfd.c b/util/userfaultfd.c
index fdff4867e8b..1b2fa949d4d 100644
--- a/util/userfaultfd.c
+++ b/util/userfaultfd.c
@@ -18,7 +18,6 @@
 #include <poll.h>
 #include <sys/syscall.h>
 #include <sys/ioctl.h>
-#include <fcntl.h>
 
 typedef enum {
     UFFD_UNINITIALIZED = 0,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PATCH 03/10] disas/riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
@ 2024-01-25 16:59   ` Philippe Mathieu-Daudé
  2024-01-26 15:44   ` Zhao Liu
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 36+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-25 16:59 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/1/24 17:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
>   ./scripts/clean-includes --git disas/riscv disas/riscv*[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   disas/riscv.h          | 1 -
>   disas/riscv-xthead.c   | 1 +
>   disas/riscv-xventana.c | 1 +
>   3 files changed, 2 insertions(+), 1 deletion(-)

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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 04/10] aspeed: Clean up includes
  2024-01-25 16:34 ` [PATCH 04/10] aspeed: " Peter Maydell
@ 2024-01-25 16:59   ` Philippe Mathieu-Daudé
  2024-01-26 15:39   ` Zhao Liu
  2024-01-27  5:05   ` Richard Henderson
  2 siblings, 0 replies; 36+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-25 16:59 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/1/24 17:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes.
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/arm/aspeed_eeprom.h     | 1 -
>   tests/qtest/qtest_aspeed.h | 2 --
>   hw/arm/aspeed_eeprom.c     | 1 +
>   3 files changed, 1 insertion(+), 3 deletions(-)

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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 06/10] m68k: Clean up includes
  2024-01-25 16:34 ` [PATCH 06/10] m68k: " Peter Maydell
@ 2024-01-25 17:00   ` Philippe Mathieu-Daudé
  2024-01-26 15:43   ` Thomas Huth
  2024-01-26 15:44   ` Zhao Liu
  2 siblings, 0 replies; 36+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-25 17:00 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/1/24 17:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
> ./scripts/clean-includes --git m68k include/hw/audio/asc.h include/hw/m68k/*.h
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   include/hw/audio/asc.h      | 1 -
>   include/hw/m68k/q800-glue.h | 1 -
>   2 files changed, 2 deletions(-)

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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 08/10] cxl: Clean up includes
  2024-01-25 16:34 ` [PATCH 08/10] cxl: " Peter Maydell
@ 2024-01-25 17:00   ` Philippe Mathieu-Daudé
  2024-01-26 15:41   ` Zhao Liu
  2024-01-29 10:35   ` Jonathan Cameron via
  2 siblings, 0 replies; 36+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-25 17:00 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/1/24 17:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes.
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/cxl/cxl-events.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 09/10] riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 09/10] riscv: " Peter Maydell
@ 2024-01-25 17:00   ` Philippe Mathieu-Daudé
  2024-01-26 15:41   ` Zhao Liu
  2024-01-30  0:43   ` Alistair Francis
  2 siblings, 0 replies; 36+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-25 17:00 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/1/24 17:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
>   ./scripts/clean-includes --git riscv target/riscv/*.[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   target/riscv/vector_internals.h | 1 -
>   target/riscv/vector_internals.c | 1 +
>   2 files changed, 1 insertion(+), 1 deletion(-)

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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 05/10] acpi: Clean up includes
  2024-01-25 16:34 ` [PATCH 05/10] acpi: " Peter Maydell
@ 2024-01-25 17:01   ` Philippe Mathieu-Daudé
  2024-01-26 15:40   ` Zhao Liu
  2024-01-27  5:06   ` Richard Henderson
  2 siblings, 0 replies; 36+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-25 17:01 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/1/24 17:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
>   ./scripts/clean-includes --git acpi include/hw/*/*acpi.h hw/*/*acpi.c
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   include/hw/nvram/fw_cfg_acpi.h  | 1 -
>   include/hw/virtio/virtio-acpi.h | 1 -
>   hw/nvram/fw_cfg-acpi.c          | 1 +
>   hw/virtio/virtio-acpi.c         | 1 +
>   4 files changed, 2 insertions(+), 2 deletions(-)

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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 04/10] aspeed: Clean up includes
  2024-01-26 15:39   ` Zhao Liu
@ 2024-01-26 15:38     ` Peter Maydell
  0 siblings, 0 replies; 36+ messages in thread
From: Peter Maydell @ 2024-01-26 15:38 UTC (permalink / raw)
  To: Zhao Liu; +Cc: qemu-devel, qemu-trivial

On Fri, 26 Jan 2024 at 15:26, Zhao Liu <zhao1.liu@intel.com> wrote:
>
> On Thu, Jan 25, 2024 at 04:34:02PM +0000, Peter Maydell wrote:
> > Date: Thu, 25 Jan 2024 16:34:02 +0000
> > From: Peter Maydell <peter.maydell@linaro.org>
> > Subject: [PATCH 04/10] aspeed: Clean up includes
> > X-Mailer: git-send-email 2.34.1
> >
> > This commit was created with scripts/clean-includes.
> >
> > All .c should include qemu/osdep.h first.  The script performs three
> > related cleanups:
> >
> > * Ensure .c files include qemu/osdep.h first.
> > * Including it in a .h is redundant, since the .c  already includes
> >   it.  Drop such inclusions.
> > * Likewise, including headers qemu/osdep.h includes is redundant.
> >   Drop these, too.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> >  hw/arm/aspeed_eeprom.h     | 1 -
> >  tests/qtest/qtest_aspeed.h | 2 --
> >  hw/arm/aspeed_eeprom.c     | 1 +
> >  3 files changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
> > index bbf9e54365b..f08c16ef506 100644
> > --- a/hw/arm/aspeed_eeprom.h
> > +++ b/hw/arm/aspeed_eeprom.h
> > @@ -7,7 +7,6 @@
> >  #ifndef ASPEED_EEPROM_H
> >  #define ASPEED_EEPROM_H
> >
> > -#include "qemu/osdep.h"
> >
> >  extern const uint8_t tiogapass_bmc_fruid[];
> >  extern const size_t tiogapass_bmc_fruid_len;
> > diff --git a/tests/qtest/qtest_aspeed.h b/tests/qtest/qtest_aspeed.h
> > index 235dfaa186a..d35b0c7cba5 100644
> > --- a/tests/qtest/qtest_aspeed.h
> > +++ b/tests/qtest/qtest_aspeed.h
> > @@ -12,8 +12,6 @@
> >  #ifndef QTEST_ASPEED_H
> >  #define QTEST_ASPEED_H
> >
> > -#include <stdint.h>
> > -
> >  #include "libqtest.h"
> >
> >  #define AST2600_ASPEED_I2C_BASE_ADDR 0x1e78a000
> > diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
> > index ace5266cec9..daa3d329d10 100644
> > --- a/hw/arm/aspeed_eeprom.c
> > +++ b/hw/arm/aspeed_eeprom.c
> > @@ -4,6 +4,7 @@
> >   * SPDX-License-Identifier: GPL-2.0-only
> >   */
> >
> > +#include "qemu/osdep.h"
>
> Just a question, as the code style, should we add a blank line after
> this header?

No, we don't generally include blank lines in the #include
block. (But all these patches are autogenerated, so you get
what the script generates :-))

thanks
-- PMM


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 04/10] aspeed: Clean up includes
  2024-01-25 16:34 ` [PATCH 04/10] aspeed: " Peter Maydell
  2024-01-25 16:59   ` Philippe Mathieu-Daudé
@ 2024-01-26 15:39   ` Zhao Liu
  2024-01-26 15:38     ` Peter Maydell
  2024-01-27  5:05   ` Richard Henderson
  2 siblings, 1 reply; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:39 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:02PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:02 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 04/10] aspeed: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes.
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/arm/aspeed_eeprom.h     | 1 -
>  tests/qtest/qtest_aspeed.h | 2 --
>  hw/arm/aspeed_eeprom.c     | 1 +
>  3 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
> index bbf9e54365b..f08c16ef506 100644
> --- a/hw/arm/aspeed_eeprom.h
> +++ b/hw/arm/aspeed_eeprom.h
> @@ -7,7 +7,6 @@
>  #ifndef ASPEED_EEPROM_H
>  #define ASPEED_EEPROM_H
>  
> -#include "qemu/osdep.h"
>  
>  extern const uint8_t tiogapass_bmc_fruid[];
>  extern const size_t tiogapass_bmc_fruid_len;
> diff --git a/tests/qtest/qtest_aspeed.h b/tests/qtest/qtest_aspeed.h
> index 235dfaa186a..d35b0c7cba5 100644
> --- a/tests/qtest/qtest_aspeed.h
> +++ b/tests/qtest/qtest_aspeed.h
> @@ -12,8 +12,6 @@
>  #ifndef QTEST_ASPEED_H
>  #define QTEST_ASPEED_H
>  
> -#include <stdint.h>
> -
>  #include "libqtest.h"
>  
>  #define AST2600_ASPEED_I2C_BASE_ADDR 0x1e78a000
> diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
> index ace5266cec9..daa3d329d10 100644
> --- a/hw/arm/aspeed_eeprom.c
> +++ b/hw/arm/aspeed_eeprom.c
> @@ -4,6 +4,7 @@
>   * SPDX-License-Identifier: GPL-2.0-only
>   */
>  
> +#include "qemu/osdep.h"

Just a question, as the code style, should we add a blank line after
this header?

>  #include "aspeed_eeprom.h"
>  
>  /* Tiogapass BMC FRU */
> -- 
> 2.34.1
> 

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 05/10] acpi: Clean up includes
  2024-01-25 16:34 ` [PATCH 05/10] acpi: " Peter Maydell
  2024-01-25 17:01   ` Philippe Mathieu-Daudé
@ 2024-01-26 15:40   ` Zhao Liu
  2024-01-27  5:06   ` Richard Henderson
  2 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:40 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:03PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:03 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 05/10] acpi: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git acpi include/hw/*/*acpi.h hw/*/*acpi.c
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  include/hw/nvram/fw_cfg_acpi.h  | 1 -
>  include/hw/virtio/virtio-acpi.h | 1 -
>  hw/nvram/fw_cfg-acpi.c          | 1 +
>  hw/virtio/virtio-acpi.c         | 1 +
>  4 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/include/hw/nvram/fw_cfg_acpi.h b/include/hw/nvram/fw_cfg_acpi.h
> index b6553d86fcb..b39eb0490ff 100644
> --- a/include/hw/nvram/fw_cfg_acpi.h
> +++ b/include/hw/nvram/fw_cfg_acpi.h
> @@ -7,7 +7,6 @@
>  #ifndef FW_CFG_ACPI_H
>  #define FW_CFG_ACPI_H
>  
> -#include "qemu/osdep.h"
>  #include "exec/hwaddr.h"
>  
>  void fw_cfg_acpi_dsdt_add(Aml *scope, const MemMapEntry *fw_cfg_memmap);
> diff --git a/include/hw/virtio/virtio-acpi.h b/include/hw/virtio/virtio-acpi.h
> index 844e102569e..cace2a315f4 100644
> --- a/include/hw/virtio/virtio-acpi.h
> +++ b/include/hw/virtio/virtio-acpi.h
> @@ -6,7 +6,6 @@
>  #ifndef VIRTIO_ACPI_H
>  #define VIRTIO_ACPI_H
>  
> -#include "qemu/osdep.h"
>  #include "exec/hwaddr.h"
>  
>  void virtio_acpi_dsdt_add(Aml *scope, const hwaddr virtio_mmio_base,
> diff --git a/hw/nvram/fw_cfg-acpi.c b/hw/nvram/fw_cfg-acpi.c
> index 4e48baeaa01..58cdcd3121c 100644
> --- a/hw/nvram/fw_cfg-acpi.c
> +++ b/hw/nvram/fw_cfg-acpi.c
> @@ -4,6 +4,7 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
>  #include "hw/nvram/fw_cfg_acpi.h"
>  #include "hw/acpi/aml-build.h"
>  
> diff --git a/hw/virtio/virtio-acpi.c b/hw/virtio/virtio-acpi.c
> index e18cb38bdbe..230a6695001 100644
> --- a/hw/virtio/virtio-acpi.c
> +++ b/hw/virtio/virtio-acpi.c
> @@ -4,6 +4,7 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
>  #include "hw/virtio/virtio-acpi.h"
>  #include "hw/acpi/aml-build.h"
>  
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 09/10] riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 09/10] riscv: " Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
@ 2024-01-26 15:41   ` Zhao Liu
  2024-01-30  0:43   ` Alistair Francis
  2 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:41 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:07PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:07 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 09/10] riscv: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git riscv target/riscv/*.[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  target/riscv/vector_internals.h | 1 -
>  target/riscv/vector_internals.c | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
> index 8133111e5f6..842765f6c16 100644
> --- a/target/riscv/vector_internals.h
> +++ b/target/riscv/vector_internals.h
> @@ -19,7 +19,6 @@
>  #ifndef TARGET_RISCV_VECTOR_INTERNALS_H
>  #define TARGET_RISCV_VECTOR_INTERNALS_H
>  
> -#include "qemu/osdep.h"
>  #include "qemu/bitops.h"
>  #include "cpu.h"
>  #include "tcg/tcg-gvec-desc.h"
> diff --git a/target/riscv/vector_internals.c b/target/riscv/vector_internals.c
> index 9cf5c17cdea..12f5964fbbe 100644
> --- a/target/riscv/vector_internals.c
> +++ b/target/riscv/vector_internals.c
> @@ -16,6 +16,7 @@
>   * this program.  If not, see <http://www.gnu.org/licenses/>.
>   */
>  
> +#include "qemu/osdep.h"
>  #include "vector_internals.h"
>  
>  /* set agnostic elements to 1s */
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 08/10] cxl: Clean up includes
  2024-01-25 16:34 ` [PATCH 08/10] cxl: " Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
@ 2024-01-26 15:41   ` Zhao Liu
  2024-01-29 10:35   ` Jonathan Cameron via
  2 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:41 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:06PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:06 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 08/10] cxl: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes.
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/cxl/cxl-events.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/hw/cxl/cxl-events.c b/hw/cxl/cxl-events.c
> index bee6dfaf148..affcf8a34dd 100644
> --- a/hw/cxl/cxl-events.c
> +++ b/hw/cxl/cxl-events.c
> @@ -7,11 +7,9 @@
>   * COPYING file in the top-level directory.
>   */
>  
> -#include <stdint.h>
> -
>  #include "qemu/osdep.h"
> +
>  #include "qemu/bswap.h"
> -#include "qemu/typedefs.h"
>  #include "qemu/error-report.h"
>  #include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 06/10] m68k: Clean up includes
  2024-01-25 16:34 ` [PATCH 06/10] m68k: " Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
@ 2024-01-26 15:43   ` Thomas Huth
  2024-01-26 15:44   ` Zhao Liu
  2 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2024-01-26 15:43 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 25/01/2024 17.34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
> ./scripts/clean-includes --git m68k include/hw/audio/asc.h include/hw/m68k/*.h
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   include/hw/audio/asc.h      | 1 -
>   include/hw/m68k/q800-glue.h | 1 -
>   2 files changed, 2 deletions(-)
> 
> diff --git a/include/hw/audio/asc.h b/include/hw/audio/asc.h
> index 4741f92c461..04fac270b6a 100644
> --- a/include/hw/audio/asc.h
> +++ b/include/hw/audio/asc.h
> @@ -13,7 +13,6 @@
>   #ifndef HW_AUDIO_ASC_H
>   #define HW_AUDIO_ASC_H
>   
> -#include "qemu/osdep.h"
>   #include "hw/sysbus.h"
>   #include "audio/audio.h"
>   
> diff --git a/include/hw/m68k/q800-glue.h b/include/hw/m68k/q800-glue.h
> index ceb916d16c1..04fac25f6c2 100644
> --- a/include/hw/m68k/q800-glue.h
> +++ b/include/hw/m68k/q800-glue.h
> @@ -23,7 +23,6 @@
>   #ifndef HW_Q800_GLUE_H
>   #define HW_Q800_GLUE_H
>   
> -#include "qemu/osdep.h"
>   #include "hw/sysbus.h"
>   
>   #define TYPE_GLUE "q800-glue"

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 07/10] include: Clean up includes
  2024-01-25 16:34 ` [PATCH 07/10] include: " Peter Maydell
@ 2024-01-26 15:43   ` Zhao Liu
  0 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:43 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:05PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:05 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 07/10] include: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git include include/*/*.h include/*/*/*.h
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I hand-checked that all these headers are included only by .c
> files which already have osdep.h included.
> ---
>  include/hw/arm/raspberrypi-fw-defs.h | 1 -
>  include/hw/mem/memory-device.h       | 1 -
>  include/hw/ppc/spapr_nested.h        | 1 -
>  include/hw/xen/xen-hvm-common.h      | 1 -
>  include/qemu/qtree.h                 | 1 -
>  include/ui/rect.h                    | 2 --
>  6 files changed, 7 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/include/hw/arm/raspberrypi-fw-defs.h b/include/hw/arm/raspberrypi-fw-defs.h
> index 4551fe7450d..579cf0d5546 100644
> --- a/include/hw/arm/raspberrypi-fw-defs.h
> +++ b/include/hw/arm/raspberrypi-fw-defs.h
> @@ -10,7 +10,6 @@
>  #ifndef INCLUDE_HW_MISC_RASPBERRYPI_FW_DEFS_H_
>  #define INCLUDE_HW_MISC_RASPBERRYPI_FW_DEFS_H_
>  
> -#include "qemu/osdep.h"
>  
>  enum rpi_firmware_property_tag {
>      RPI_FWREQ_PROPERTY_END =                           0,
> diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
> index a1d62cc551a..e0571c8a319 100644
> --- a/include/hw/mem/memory-device.h
> +++ b/include/hw/mem/memory-device.h
> @@ -14,7 +14,6 @@
>  #define MEMORY_DEVICE_H
>  
>  #include "hw/qdev-core.h"
> -#include "qemu/typedefs.h"
>  #include "qapi/qapi-types-machine.h"
>  #include "qom/object.h"
>  
> diff --git a/include/hw/ppc/spapr_nested.h b/include/hw/ppc/spapr_nested.h
> index d3834864764..d312a5d61da 100644
> --- a/include/hw/ppc/spapr_nested.h
> +++ b/include/hw/ppc/spapr_nested.h
> @@ -1,7 +1,6 @@
>  #ifndef HW_SPAPR_NESTED_H
>  #define HW_SPAPR_NESTED_H
>  
> -#include "qemu/osdep.h"
>  #include "target/ppc/cpu.h"
>  
>  /*
> diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h
> index 4e9904f1a65..4b1d728f35c 100644
> --- a/include/hw/xen/xen-hvm-common.h
> +++ b/include/hw/xen/xen-hvm-common.h
> @@ -1,7 +1,6 @@
>  #ifndef HW_XEN_HVM_COMMON_H
>  #define HW_XEN_HVM_COMMON_H
>  
> -#include "qemu/osdep.h"
>  #include "qemu/units.h"
>  
>  #include "cpu.h"
> diff --git a/include/qemu/qtree.h b/include/qemu/qtree.h
> index 69fe74b50d0..dc2b14d2582 100644
> --- a/include/qemu/qtree.h
> +++ b/include/qemu/qtree.h
> @@ -42,7 +42,6 @@
>  #ifndef QEMU_QTREE_H
>  #define QEMU_QTREE_H
>  
> -#include "qemu/osdep.h"
>  
>  #ifdef HAVE_GLIB_WITH_SLICE_ALLOCATOR
>  
> diff --git a/include/ui/rect.h b/include/ui/rect.h
> index 68f05d78a8e..7ebf47ebcdc 100644
> --- a/include/ui/rect.h
> +++ b/include/ui/rect.h
> @@ -4,8 +4,6 @@
>  #ifndef QEMU_RECT_H
>  #define QEMU_RECT_H
>  
> -#include <stdint.h>
> -#include <stdbool.h>
>  
>  typedef struct QemuRect {
>      int16_t x;
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 03/10] disas/riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
  2024-01-25 16:59   ` Philippe Mathieu-Daudé
@ 2024-01-26 15:44   ` Zhao Liu
  2024-01-27  5:05   ` Richard Henderson
  2024-01-31 23:43   ` Alistair Francis
  3 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:44 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:01PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:01 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 03/10] disas/riscv: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git disas/riscv disas/riscv*[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  disas/riscv.h          | 1 -
>  disas/riscv-xthead.c   | 1 +
>  disas/riscv-xventana.c | 1 +
>  3 files changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/disas/riscv.h b/disas/riscv.h
> index 19e5ed2ce63..16a08e4895c 100644
> --- a/disas/riscv.h
> +++ b/disas/riscv.h
> @@ -7,7 +7,6 @@
>  #ifndef DISAS_RISCV_H
>  #define DISAS_RISCV_H
>  
> -#include "qemu/osdep.h"
>  #include "target/riscv/cpu_cfg.h"
>  
>  /* types */
> diff --git a/disas/riscv-xthead.c b/disas/riscv-xthead.c
> index 99da679d16c..fcca326d1c3 100644
> --- a/disas/riscv-xthead.c
> +++ b/disas/riscv-xthead.c
> @@ -4,6 +4,7 @@
>   * SPDX-License-Identifier: GPL-2.0-or-later
>   */
>  
> +#include "qemu/osdep.h"
>  #include "disas/riscv.h"
>  #include "disas/riscv-xthead.h"
>  
> diff --git a/disas/riscv-xventana.c b/disas/riscv-xventana.c
> index a0224d1fb31..cd694f15f32 100644
> --- a/disas/riscv-xventana.c
> +++ b/disas/riscv-xventana.c
> @@ -4,6 +4,7 @@
>   * SPDX-License-Identifier: GPL-2.0-or-later
>   */
>  
> +#include "qemu/osdep.h"
>  #include "disas/riscv.h"
>  #include "disas/riscv-xventana.h"
>  
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 06/10] m68k: Clean up includes
  2024-01-25 16:34 ` [PATCH 06/10] m68k: " Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
  2024-01-26 15:43   ` Thomas Huth
@ 2024-01-26 15:44   ` Zhao Liu
  2 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:44 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:04PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:04 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 06/10] m68k: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
> ./scripts/clean-includes --git m68k include/hw/audio/asc.h include/hw/m68k/*.h
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  include/hw/audio/asc.h      | 1 -
>  include/hw/m68k/q800-glue.h | 1 -
>  2 files changed, 2 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/include/hw/audio/asc.h b/include/hw/audio/asc.h
> index 4741f92c461..04fac270b6a 100644
> --- a/include/hw/audio/asc.h
> +++ b/include/hw/audio/asc.h
> @@ -13,7 +13,6 @@
>  #ifndef HW_AUDIO_ASC_H
>  #define HW_AUDIO_ASC_H
>  
> -#include "qemu/osdep.h"
>  #include "hw/sysbus.h"
>  #include "audio/audio.h"
>  
> diff --git a/include/hw/m68k/q800-glue.h b/include/hw/m68k/q800-glue.h
> index ceb916d16c1..04fac25f6c2 100644
> --- a/include/hw/m68k/q800-glue.h
> +++ b/include/hw/m68k/q800-glue.h
> @@ -23,7 +23,6 @@
>  #ifndef HW_Q800_GLUE_H
>  #define HW_Q800_GLUE_H
>  
> -#include "qemu/osdep.h"
>  #include "hw/sysbus.h"
>  
>  #define TYPE_GLUE "q800-glue"
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/10] hyperv: Clean up includes
  2024-01-25 16:34 ` [PATCH 02/10] hyperv: Clean up includes Peter Maydell
@ 2024-01-26 15:45   ` Zhao Liu
  2024-01-27  5:04   ` Richard Henderson
  1 sibling, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:45 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:00PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:00 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 02/10] hyperv: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git hyperv hw/hyperv/*.[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/hyperv/hv-balloon-internal.h           | 1 -
>  hw/hyperv/hv-balloon-our_range_memslots.h | 1 -
>  hw/hyperv/hv-balloon-page_range_tree.h    | 1 -
>  hw/hyperv/hv-balloon-our_range_memslots.c | 1 +
>  hw/hyperv/hv-balloon-page_range_tree.c    | 1 +
>  hw/hyperv/hv-balloon.c                    | 1 +
>  6 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/hw/hyperv/hv-balloon-internal.h b/hw/hyperv/hv-balloon-internal.h
> index 164c2e58253..ee53a28a266 100644
> --- a/hw/hyperv/hv-balloon-internal.h
> +++ b/hw/hyperv/hv-balloon-internal.h
> @@ -10,7 +10,6 @@
>  #ifndef HW_HYPERV_HV_BALLOON_INTERNAL_H
>  #define HW_HYPERV_HV_BALLOON_INTERNAL_H
>  
> -#include "qemu/osdep.h"
>  
>  #define HV_BALLOON_PFN_SHIFT 12
>  #define HV_BALLOON_PAGE_SIZE (1 << HV_BALLOON_PFN_SHIFT)
> diff --git a/hw/hyperv/hv-balloon-our_range_memslots.h b/hw/hyperv/hv-balloon-our_range_memslots.h
> index b6f592d34b0..df3b686bc7c 100644
> --- a/hw/hyperv/hv-balloon-our_range_memslots.h
> +++ b/hw/hyperv/hv-balloon-our_range_memslots.h
> @@ -10,7 +10,6 @@
>  #ifndef HW_HYPERV_HV_BALLOON_OUR_RANGE_MEMSLOTS_H
>  #define HW_HYPERV_HV_BALLOON_OUR_RANGE_MEMSLOTS_H
>  
> -#include "qemu/osdep.h"
>  
>  #include "exec/memory.h"
>  #include "qom/object.h"
> diff --git a/hw/hyperv/hv-balloon-page_range_tree.h b/hw/hyperv/hv-balloon-page_range_tree.h
> index 07a9ae0da61..333772b86d2 100644
> --- a/hw/hyperv/hv-balloon-page_range_tree.h
> +++ b/hw/hyperv/hv-balloon-page_range_tree.h
> @@ -10,7 +10,6 @@
>  #ifndef HW_HYPERV_HV_BALLOON_PAGE_RANGE_TREE_H
>  #define HW_HYPERV_HV_BALLOON_PAGE_RANGE_TREE_H
>  
> -#include "qemu/osdep.h"
>  
>  /* PageRange */
>  typedef struct PageRange {
> diff --git a/hw/hyperv/hv-balloon-our_range_memslots.c b/hw/hyperv/hv-balloon-our_range_memslots.c
> index 99bae870f37..1505a395cf7 100644
> --- a/hw/hyperv/hv-balloon-our_range_memslots.c
> +++ b/hw/hyperv/hv-balloon-our_range_memslots.c
> @@ -7,6 +7,7 @@
>   * See the COPYING file in the top-level directory.
>   */
>  
> +#include "qemu/osdep.h"
>  #include "hv-balloon-internal.h"
>  #include "hv-balloon-our_range_memslots.h"
>  #include "trace.h"
> diff --git a/hw/hyperv/hv-balloon-page_range_tree.c b/hw/hyperv/hv-balloon-page_range_tree.c
> index e178d8b413c..dfb14852f42 100644
> --- a/hw/hyperv/hv-balloon-page_range_tree.c
> +++ b/hw/hyperv/hv-balloon-page_range_tree.c
> @@ -7,6 +7,7 @@
>   * See the COPYING file in the top-level directory.
>   */
>  
> +#include "qemu/osdep.h"
>  #include "hv-balloon-internal.h"
>  #include "hv-balloon-page_range_tree.h"
>  
> diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c
> index 66f297c1d7e..02383657124 100644
> --- a/hw/hyperv/hv-balloon.c
> +++ b/hw/hyperv/hv-balloon.c
> @@ -7,6 +7,7 @@
>   * See the COPYING file in the top-level directory.
>   */
>  
> +#include "qemu/osdep.h"
>  #include "hv-balloon-internal.h"
>  
>  #include "exec/address-spaces.h"
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 10/10] misc: Clean up includes
  2024-01-25 16:34 ` [PATCH 10/10] misc: " Peter Maydell
@ 2024-01-26 15:47   ` Zhao Liu
  0 siblings, 0 replies; 36+ messages in thread
From: Zhao Liu @ 2024-01-26 15:47 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, Jan 25, 2024 at 04:34:08PM +0000, Peter Maydell wrote:
> Date: Thu, 25 Jan 2024 16:34:08 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 10/10] misc: Clean up includes
> X-Mailer: git-send-email 2.34.1
> 
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git misc net/af-xdp.c plugins/*.c audio/pwaudio.c util/userfaultfd.c
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> These are all cases where files include things osdep already gives them.
> ---
>  audio/pwaudio.c    | 1 -
>  net/af-xdp.c       | 1 -
>  plugins/core.c     | 1 -
>  plugins/loader.c   | 1 -
>  util/userfaultfd.c | 1 -
>  5 files changed, 5 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/audio/pwaudio.c b/audio/pwaudio.c
> index 3ce5f6507b4..3b14e04fbb0 100644
> --- a/audio/pwaudio.c
> +++ b/audio/pwaudio.c
> @@ -11,7 +11,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/module.h"
>  #include "audio.h"
> -#include <errno.h>
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
>  #include <spa/param/audio/format-utils.h>
> diff --git a/net/af-xdp.c b/net/af-xdp.c
> index 6c65028fb00..38e600703a3 100644
> --- a/net/af-xdp.c
> +++ b/net/af-xdp.c
> @@ -13,7 +13,6 @@
>  
>  #include "qemu/osdep.h"
>  #include <bpf/bpf.h>
> -#include <inttypes.h>
>  #include <linux/if_link.h>
>  #include <linux/if_xdp.h>
>  #include <net/if.h>
> diff --git a/plugins/core.c b/plugins/core.c
> index 49588285dd0..ee2fa41af9e 100644
> --- a/plugins/core.c
> +++ b/plugins/core.c
> @@ -27,7 +27,6 @@
>  #include "tcg/tcg.h"
>  #include "tcg/tcg-op.h"
>  #include "plugin.h"
> -#include "qemu/compiler.h"
>  
>  struct qemu_plugin_cb {
>      struct qemu_plugin_ctx *ctx;
> diff --git a/plugins/loader.c b/plugins/loader.c
> index 734c11cae04..9768b78eb6b 100644
> --- a/plugins/loader.c
> +++ b/plugins/loader.c
> @@ -33,7 +33,6 @@
>  #ifndef CONFIG_USER_ONLY
>  #include "hw/boards.h"
>  #endif
> -#include "qemu/compiler.h"
>  
>  #include "plugin.h"
>  
> diff --git a/util/userfaultfd.c b/util/userfaultfd.c
> index fdff4867e8b..1b2fa949d4d 100644
> --- a/util/userfaultfd.c
> +++ b/util/userfaultfd.c
> @@ -18,7 +18,6 @@
>  #include <poll.h>
>  #include <sys/syscall.h>
>  #include <sys/ioctl.h>
> -#include <fcntl.h>
>  
>  typedef enum {
>      UFFD_UNINITIALIZED = 0,
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/10] hyperv: Clean up includes
  2024-01-25 16:34 ` [PATCH 02/10] hyperv: Clean up includes Peter Maydell
  2024-01-26 15:45   ` Zhao Liu
@ 2024-01-27  5:04   ` Richard Henderson
  1 sibling, 0 replies; 36+ messages in thread
From: Richard Henderson @ 2024-01-27  5:04 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 1/26/24 02:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
>   ./scripts/clean-includes --git hyperv hw/hyperv/*.[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   hw/hyperv/hv-balloon-internal.h           | 1 -
>   hw/hyperv/hv-balloon-our_range_memslots.h | 1 -
>   hw/hyperv/hv-balloon-page_range_tree.h    | 1 -
>   hw/hyperv/hv-balloon-our_range_memslots.c | 1 +
>   hw/hyperv/hv-balloon-page_range_tree.c    | 1 +
>   hw/hyperv/hv-balloon.c                    | 1 +
>   6 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 03/10] disas/riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
  2024-01-25 16:59   ` Philippe Mathieu-Daudé
  2024-01-26 15:44   ` Zhao Liu
@ 2024-01-27  5:05   ` Richard Henderson
  2024-01-31 23:43   ` Alistair Francis
  3 siblings, 0 replies; 36+ messages in thread
From: Richard Henderson @ 2024-01-27  5:05 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 1/26/24 02:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
>   ./scripts/clean-includes --git disas/riscv disas/riscv*[ch]
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   disas/riscv.h          | 1 -
>   disas/riscv-xthead.c   | 1 +
>   disas/riscv-xventana.c | 1 +
>   3 files changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 04/10] aspeed: Clean up includes
  2024-01-25 16:34 ` [PATCH 04/10] aspeed: " Peter Maydell
  2024-01-25 16:59   ` Philippe Mathieu-Daudé
  2024-01-26 15:39   ` Zhao Liu
@ 2024-01-27  5:05   ` Richard Henderson
  2 siblings, 0 replies; 36+ messages in thread
From: Richard Henderson @ 2024-01-27  5:05 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 1/26/24 02:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes.
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   hw/arm/aspeed_eeprom.h     | 1 -
>   tests/qtest/qtest_aspeed.h | 2 --
>   hw/arm/aspeed_eeprom.c     | 1 +
>   3 files changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 05/10] acpi: Clean up includes
  2024-01-25 16:34 ` [PATCH 05/10] acpi: " Peter Maydell
  2024-01-25 17:01   ` Philippe Mathieu-Daudé
  2024-01-26 15:40   ` Zhao Liu
@ 2024-01-27  5:06   ` Richard Henderson
  2 siblings, 0 replies; 36+ messages in thread
From: Richard Henderson @ 2024-01-27  5:06 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

On 1/26/24 02:34, Peter Maydell wrote:
> This commit was created with scripts/clean-includes:
>   ./scripts/clean-includes --git acpi include/hw/*/*acpi.h hw/*/*acpi.c
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>    it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>    Drop these, too.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   include/hw/nvram/fw_cfg_acpi.h  | 1 -
>   include/hw/virtio/virtio-acpi.h | 1 -
>   hw/nvram/fw_cfg-acpi.c          | 1 +
>   hw/virtio/virtio-acpi.c         | 1 +
>   4 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 00/10] Clean up includes
  2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
                   ` (9 preceding siblings ...)
  2024-01-25 16:34 ` [PATCH 10/10] misc: " Peter Maydell
@ 2024-01-27  5:53 ` Michael Tokarev
  10 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2024-01-27  5:53 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial

25.01.2024 19:33, Peter Maydell :
> This series makes a bunch of automated edits with the clean-includes
> script. The script performs three related cleanups:
> 
>   * Ensure .c files include qemu/osdep.h first.
>   * Including it in a .h is redundant, since the .c  already includes
>     it.  Drop such inclusions.
>   * Likewise, including headers qemu/osdep.h includes is redundant.
>     Drop these, too.
> 
> I created the series by looking at a run of the script across the
> whole tree (./scripts/clean-includes --git includes --all) produces,
> and then disentangling that into (a) different cohesive parts and (b)
> files that needed to go into the script's exclude-list.
> 
> After this series, the tree is still not entirely clean -- there
> are 20 other files the script wants to change. But at least some
> of them are things that should be on the exclude list, and some
> are things which I didn't feel like taking the time to try to
> decide whether they should be fixed or excluded. I might come
> back to these at some later date, but I figured this series was
> enough to be going on with.
> 
> thanks
> -- PMM
> 
> Peter Maydell (10):
>    scripts/clean-includes: Update exclude list
>    hyperv: Clean up includes
>    disas/riscv: Clean up includes
>    aspeed: Clean up includes
>    acpi: Clean up includes
>    m68k: Clean up includes
>    include: Clean up includes
>    cxl: Clean up includes
>    riscv: Clean up includes
>    misc: Clean up includes

Applied to trivial-patches tree, thanks!

/mjt


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 08/10] cxl: Clean up includes
  2024-01-25 16:34 ` [PATCH 08/10] cxl: " Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
  2024-01-26 15:41   ` Zhao Liu
@ 2024-01-29 10:35   ` Jonathan Cameron via
  2 siblings, 0 replies; 36+ messages in thread
From: Jonathan Cameron via @ 2024-01-29 10:35 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Thu, 25 Jan 2024 16:34:06 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> This commit was created with scripts/clean-includes.
> 
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
> 
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  hw/cxl/cxl-events.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/hw/cxl/cxl-events.c b/hw/cxl/cxl-events.c
> index bee6dfaf148..affcf8a34dd 100644
> --- a/hw/cxl/cxl-events.c
> +++ b/hw/cxl/cxl-events.c
> @@ -7,11 +7,9 @@
>   * COPYING file in the top-level directory.
>   */
>  
> -#include <stdint.h>
> -
>  #include "qemu/osdep.h"
> +
>  #include "qemu/bswap.h"
> -#include "qemu/typedefs.h"
>  #include "qemu/error-report.h"
>  #include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 09/10] riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 09/10] riscv: " Peter Maydell
  2024-01-25 17:00   ` Philippe Mathieu-Daudé
  2024-01-26 15:41   ` Zhao Liu
@ 2024-01-30  0:43   ` Alistair Francis
  2 siblings, 0 replies; 36+ messages in thread
From: Alistair Francis @ 2024-01-30  0:43 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Fri, Jan 26, 2024 at 2:35 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git riscv target/riscv/*.[ch]
>
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
>
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/vector_internals.h | 1 -
>  target/riscv/vector_internals.c | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
> index 8133111e5f6..842765f6c16 100644
> --- a/target/riscv/vector_internals.h
> +++ b/target/riscv/vector_internals.h
> @@ -19,7 +19,6 @@
>  #ifndef TARGET_RISCV_VECTOR_INTERNALS_H
>  #define TARGET_RISCV_VECTOR_INTERNALS_H
>
> -#include "qemu/osdep.h"
>  #include "qemu/bitops.h"
>  #include "cpu.h"
>  #include "tcg/tcg-gvec-desc.h"
> diff --git a/target/riscv/vector_internals.c b/target/riscv/vector_internals.c
> index 9cf5c17cdea..12f5964fbbe 100644
> --- a/target/riscv/vector_internals.c
> +++ b/target/riscv/vector_internals.c
> @@ -16,6 +16,7 @@
>   * this program.  If not, see <http://www.gnu.org/licenses/>.
>   */
>
> +#include "qemu/osdep.h"
>  #include "vector_internals.h"
>
>  /* set agnostic elements to 1s */
> --
> 2.34.1
>
>


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 03/10] disas/riscv: Clean up includes
  2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
                     ` (2 preceding siblings ...)
  2024-01-27  5:05   ` Richard Henderson
@ 2024-01-31 23:43   ` Alistair Francis
  3 siblings, 0 replies; 36+ messages in thread
From: Alistair Francis @ 2024-01-31 23:43 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, qemu-trivial

On Fri, Jan 26, 2024 at 4:04 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This commit was created with scripts/clean-includes:
>  ./scripts/clean-includes --git disas/riscv disas/riscv*[ch]
>
> All .c should include qemu/osdep.h first.  The script performs three
> related cleanups:
>
> * Ensure .c files include qemu/osdep.h first.
> * Including it in a .h is redundant, since the .c  already includes
>   it.  Drop such inclusions.
> * Likewise, including headers qemu/osdep.h includes is redundant.
>   Drop these, too.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  disas/riscv.h          | 1 -
>  disas/riscv-xthead.c   | 1 +
>  disas/riscv-xventana.c | 1 +
>  3 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/disas/riscv.h b/disas/riscv.h
> index 19e5ed2ce63..16a08e4895c 100644
> --- a/disas/riscv.h
> +++ b/disas/riscv.h
> @@ -7,7 +7,6 @@
>  #ifndef DISAS_RISCV_H
>  #define DISAS_RISCV_H
>
> -#include "qemu/osdep.h"
>  #include "target/riscv/cpu_cfg.h"
>
>  /* types */
> diff --git a/disas/riscv-xthead.c b/disas/riscv-xthead.c
> index 99da679d16c..fcca326d1c3 100644
> --- a/disas/riscv-xthead.c
> +++ b/disas/riscv-xthead.c
> @@ -4,6 +4,7 @@
>   * SPDX-License-Identifier: GPL-2.0-or-later
>   */
>
> +#include "qemu/osdep.h"
>  #include "disas/riscv.h"
>  #include "disas/riscv-xthead.h"
>
> diff --git a/disas/riscv-xventana.c b/disas/riscv-xventana.c
> index a0224d1fb31..cd694f15f32 100644
> --- a/disas/riscv-xventana.c
> +++ b/disas/riscv-xventana.c
> @@ -4,6 +4,7 @@
>   * SPDX-License-Identifier: GPL-2.0-or-later
>   */
>
> +#include "qemu/osdep.h"
>  #include "disas/riscv.h"
>  #include "disas/riscv-xventana.h"
>
> --
> 2.34.1
>
>


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2024-01-31 23:45 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 16:33 [PATCH 00/10] Clean up includes Peter Maydell
2024-01-25 16:33 ` [PATCH 01/10] scripts/clean-includes: Update exclude list Peter Maydell
2024-01-25 16:34 ` [PATCH 02/10] hyperv: Clean up includes Peter Maydell
2024-01-26 15:45   ` Zhao Liu
2024-01-27  5:04   ` Richard Henderson
2024-01-25 16:34 ` [PATCH 03/10] disas/riscv: " Peter Maydell
2024-01-25 16:59   ` Philippe Mathieu-Daudé
2024-01-26 15:44   ` Zhao Liu
2024-01-27  5:05   ` Richard Henderson
2024-01-31 23:43   ` Alistair Francis
2024-01-25 16:34 ` [PATCH 04/10] aspeed: " Peter Maydell
2024-01-25 16:59   ` Philippe Mathieu-Daudé
2024-01-26 15:39   ` Zhao Liu
2024-01-26 15:38     ` Peter Maydell
2024-01-27  5:05   ` Richard Henderson
2024-01-25 16:34 ` [PATCH 05/10] acpi: " Peter Maydell
2024-01-25 17:01   ` Philippe Mathieu-Daudé
2024-01-26 15:40   ` Zhao Liu
2024-01-27  5:06   ` Richard Henderson
2024-01-25 16:34 ` [PATCH 06/10] m68k: " Peter Maydell
2024-01-25 17:00   ` Philippe Mathieu-Daudé
2024-01-26 15:43   ` Thomas Huth
2024-01-26 15:44   ` Zhao Liu
2024-01-25 16:34 ` [PATCH 07/10] include: " Peter Maydell
2024-01-26 15:43   ` Zhao Liu
2024-01-25 16:34 ` [PATCH 08/10] cxl: " Peter Maydell
2024-01-25 17:00   ` Philippe Mathieu-Daudé
2024-01-26 15:41   ` Zhao Liu
2024-01-29 10:35   ` Jonathan Cameron via
2024-01-25 16:34 ` [PATCH 09/10] riscv: " Peter Maydell
2024-01-25 17:00   ` Philippe Mathieu-Daudé
2024-01-26 15:41   ` Zhao Liu
2024-01-30  0:43   ` Alistair Francis
2024-01-25 16:34 ` [PATCH 10/10] misc: " Peter Maydell
2024-01-26 15:47   ` Zhao Liu
2024-01-27  5:53 ` [PATCH 00/10] " Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.