Clean up includes
Subsystems (4)
cover Clean up includes
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(-)
Signature · 1 line
2.34.1
PATCH 1/10 scripts/clean-includes: Update exclude list
Update the exclude list to exclude some more files which don't follow our standard #include policy.
--- scripts/clean-includes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/clean-includes +1 -1
@@ -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
Signature · 1 line
2.34.1
PATCH 2/10 hyperv: Clean up includes
In reply to Peter MaydellThis 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.
--- 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(-)
hw/hyperv/hv-balloon-internal.h +0 -1
@@ -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)
hw/hyperv/hv-balloon-our_range_memslots.h +0 -1
@@ -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"
hw/hyperv/hv-balloon-page_range_tree.h +0 -1
@@ -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 {
hw/hyperv/hv-balloon-our_range_memslots.c +1 -0
@@ -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"
hw/hyperv/hv-balloon-page_range_tree.c +1 -0
@@ -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"
hw/hyperv/hv-balloon.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 02/10] hyperv: Clean up includes
Quoted 18 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:00 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 02/10] hyperv: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git hyperv hw/hyperv/*.[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>
Quoted 8 lines
--- 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(-)
Quoted 77 lines
hw/hyperv/hv-balloon-internal.h +0
-1@@ -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)hw/hyperv/hv-balloon-our_range_memslots.h +0
-1@@ -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" hw/hyperv/hv-balloon-page_range_tree.h +0
-1@@ -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 {hw/hyperv/hv-balloon-our_range_memslots.c +1
-0@@ -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" hw/hyperv/hv-balloon-page_range_tree.c +1
-0@@ -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" hw/hyperv/hv-balloon.c +1
-0@@ -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" Signature · 1 line
2.34.1
Re: [PATCH 02/10] hyperv: Clean up includes
In reply to Peter MaydellQuoted 13 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git hyperv hw/hyperv/*.[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell<[email protected]>
Quoted 8 lines
--- 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(-)
r~
PATCH 3/10 disas/riscv: Clean up includes
In reply to Peter MaydellThis 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.
--- disas/riscv.h | 1 - disas/riscv-xthead.c | 1 + disas/riscv-xventana.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
disas/riscv.h +0 -1
@@ -7,7 +7,6 @@#ifndef DISAS_RISCV_H #define DISAS_RISCV_H -#include "qemu/osdep.h" #include "target/riscv/cpu_cfg.h" /* types */
disas/riscv-xthead.c +1 -0
@@ -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"
disas/riscv-xventana.c +1 -0
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 03/10] disas/riscv: Clean up includes
Quoted 12 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git disas/riscv disas/riscv*[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 6 lines
Signed-off-by Peter Maydell <[email protected]>--- disas/riscv.h | 1 - disas/riscv-xthead.c | 1 + disas/riscv-xventana.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
Re: [PATCH 03/10] disas/riscv: Clean up includes
In reply to Peter MaydellQuoted 17 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:01 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 03/10] disas/riscv: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git disas/riscv disas/riscv*[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 6 lines
Signed-off-by Peter Maydell <[email protected]>--- disas/riscv.h | 1 - disas/riscv-xthead.c | 1 + disas/riscv-xventana.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
Quoted 41 lines
disas/riscv.h +0
-1@@ -7,7 +7,6 @@#ifndef DISAS_RISCV_H #define DISAS_RISCV_H -#include "qemu/osdep.h" #include "target/riscv/cpu_cfg.h" /* types */ disas/riscv-xthead.c +1
-0@@ -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" disas/riscv-xventana.c +1
-0@@ -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" Signature · 1 line
2.34.1
Re: [PATCH 03/10] disas/riscv: Clean up includes
In reply to Peter MaydellQuoted 12 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git disas/riscv disas/riscv*[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 6 lines
Signed-off-by Peter Maydell<[email protected]>--- disas/riscv.h | 1 - disas/riscv-xthead.c | 1 + disas/riscv-xventana.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
r~
Re: [PATCH 03/10] disas/riscv: Clean up includes
In reply to Peter MaydellQuoted 7 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git disas/riscv disas/riscv*[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:
Quoted 7 lines
* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>
Alistair
Quoted 46 lines
--- disas/riscv.h | 1 - disas/riscv-xthead.c | 1 + disas/riscv-xventana.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)disas/riscv.h +0
-1@@ -7,7 +7,6 @@#ifndef DISAS_RISCV_H #define DISAS_RISCV_H -#include "qemu/osdep.h" #include "target/riscv/cpu_cfg.h" /* types */ disas/riscv-xthead.c +1
-0@@ -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" disas/riscv-xventana.c +1
-1@@ -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
PATCH 4/10 aspeed: Clean up includes
In reply to Peter MaydellThis 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.
--- 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(-)
hw/arm/aspeed_eeprom.h +0 -1
@@ -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;
tests/qtest/qtest_aspeed.h +0 -2
@@ -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
hw/arm/aspeed_eeprom.c +1 -0
@@ -4,6 +4,7 @@* SPDX-License-Identifier: GPL-2.0-only */ +#include "qemu/osdep.h" #include "aspeed_eeprom.h" /* Tiogapass BMC FRU */
Signature · 1 line
2.34.1
Re: [PATCH 04/10] aspeed: Clean up includes
Quoted 11 lines · Peter Maydell
This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 6 lines
Signed-off-by Peter Maydell <[email protected]>--- 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(-)
Re: [PATCH 04/10] aspeed: Clean up includes
In reply to Peter MaydellQuoted 53 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:02 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 04/10] aspeed: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>--- 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(-)hw/arm/aspeed_eeprom.h +0
-1@@ -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;tests/qtest/qtest_aspeed.h +0
-2@@ -12,8 +12,6 @@#ifndef QTEST_ASPEED_H #define QTEST_ASPEED_H -#include <stdint.h> -#include "libqtest.h" #define AST2600_ASPEED_I2C_BASE_ADDR 0x1e78a000hw/arm/aspeed_eeprom.c +0
-0
hw/arm/aspeed_eeprom.c line 7
Quoted 4 lines
hw/arm/aspeed_eeprom.c +1
-0@@ -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?
Quoted 6 lines
hw/arm/aspeed_eeprom.c +0
-0#include "aspeed_eeprom.h" /* Tiogapass BMC FRU */ Signature · 1 line
2.34.1
Re: [PATCH 04/10] aspeed: Clean up includes
Quoted 58 lines · Zhao Liu
Quoted 56 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:02 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 04/10] aspeed: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>--- 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(-)hw/arm/aspeed_eeprom.h +0
-1@@ -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;tests/qtest/qtest_aspeed.h +0
-2@@ -12,8 +12,6 @@#ifndef QTEST_ASPEED_H #define QTEST_ASPEED_H -#include <stdint.h> -#include "libqtest.h" #define AST2600_ASPEED_I2C_BASE_ADDR 0x1e78a000hw/arm/aspeed_eeprom.c +0
-0@@ -4,6 +4,7 @@* SPDX-License-Identifier: GPL-2.0-only */
Quoted 4 lines
hw/arm/aspeed_eeprom.c line 7
Quoted 1 line
hw/arm/aspeed_eeprom.c +1
-0+#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
Re: [PATCH 04/10] aspeed: Clean up includes
In reply to Peter MaydellQuoted 11 lines · Peter Maydell
This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 6 lines
Signed-off-by Peter Maydell<[email protected]>--- 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(-)
r~
PATCH 5/10 acpi: Clean up includes
In reply to Peter MaydellThis 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.
--- 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(-)
include/hw/nvram/fw_cfg_acpi.h +0 -1
@@ -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);
include/hw/virtio/virtio-acpi.h +0 -1
@@ -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,
hw/nvram/fw_cfg-acpi.c +1 -0
@@ -4,6 +4,7 @@* */ +#include "qemu/osdep.h" #include "hw/nvram/fw_cfg_acpi.h" #include "hw/acpi/aml-build.h"
hw/virtio/virtio-acpi.c +1 -0
@@ -4,6 +4,7 @@* */ +#include "qemu/osdep.h" #include "hw/virtio/virtio-acpi.h" #include "hw/acpi/aml-build.h"
Signature · 1 line
2.34.1
Re: [PATCH 05/10] acpi: Clean up includes
Quoted 12 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git acpiinclude/hw/*/*acpi.hhw/*/*acpi.cAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>--- 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(-)
Re: [PATCH 05/10] acpi: Clean up includes
In reply to Peter MaydellQuoted 17 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:03 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 05/10] acpi: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git acpiinclude/hw/*/*acpi.hhw/*/*acpi.cAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>--- 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(-)
Quoted 53 lines
include/hw/nvram/fw_cfg_acpi.h +0
-1@@ -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);include/hw/virtio/virtio-acpi.h +0
-1@@ -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,hw/nvram/fw_cfg-acpi.c +1
-0@@ -4,6 +4,7 @@* */ +#include "qemu/osdep.h" #include "hw/nvram/fw_cfg_acpi.h" #include "hw/acpi/aml-build.h" hw/virtio/virtio-acpi.c +1
-0@@ -4,6 +4,7 @@* */ +#include "qemu/osdep.h" #include "hw/virtio/virtio-acpi.h" #include "hw/acpi/aml-build.h" Signature · 1 line
2.34.1
Re: [PATCH 05/10] acpi: Clean up includes
In reply to Peter MaydellQuoted 12 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git acpiinclude/hw/*/*acpi.hhw/*/*acpi.cAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 7 lines
Signed-off-by Peter Maydell<[email protected]>--- 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(-)
r~
PATCH 6/10 m68k: Clean up includes
In reply to Peter MaydellThis 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.
--- include/hw/audio/asc.h | 1 - include/hw/m68k/q800-glue.h | 1 - 2 files changed, 2 deletions(-)
include/hw/audio/asc.h +0 -1
@@ -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"
include/hw/m68k/q800-glue.h +0 -1
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 06/10] m68k: Clean up includes
Quoted 12 lines · Peter Maydell
This commit was created with
scripts/clean-includes:./scripts/clean-includes--git m68kinclude/hw/audio/asc.hinclude/hw/m68k/*.hAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>--- include/hw/audio/asc.h | 1 - include/hw/m68k/q800-glue.h | 1 - 2 files changed, 2 deletions(-)
Re: [PATCH 06/10] m68k: Clean up includes
In reply to Peter MaydellQuoted 17 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:04 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 06/10] m68k: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:./scripts/clean-includes--git m68kinclude/hw/audio/asc.hinclude/hw/m68k/*.hAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>--- include/hw/audio/asc.h | 1 - include/hw/m68k/q800-glue.h | 1 - 2 files changed, 2 deletions(-)
Quoted 29 lines
include/hw/audio/asc.h +0
-1@@ -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" include/hw/m68k/q800-glue.h +0
-1@@ -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"Signature · 1 line
2.34.1
Re: [PATCH 06/10] m68k: Clean up includes
In reply to Peter MaydellQuoted 35 lines · Peter Maydell
This commit was created with
scripts/clean-includes:./scripts/clean-includes--git m68kinclude/hw/audio/asc.hinclude/hw/m68k/*.hAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>--- include/hw/audio/asc.h | 1 - include/hw/m68k/q800-glue.h | 1 - 2 files changed, 2 deletions(-)include/hw/audio/asc.h +0
-1@@ -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" include/hw/m68k/q800-glue.h +0
-0
include/hw/m68k/q800-glue.h line 28
Quoted 7 lines
include/hw/m68k/q800-glue.h +0
-1@@ -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"
PATCH 7/10 include: Clean up includes
In reply to Peter MaydellThis 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.
---
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(-)
include/hw/arm/raspberrypi-fw-defs.h +0 -1
@@ -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,
include/hw/mem/memory-device.h +0 -1
@@ -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"
include/hw/ppc/spapr_nested.h +0 -1
@@ -1,7 +1,6 @@#ifndef HW_SPAPR_NESTED_H #define HW_SPAPR_NESTED_H -#include "qemu/osdep.h" #include "target/ppc/cpu.h" /*
include/hw/xen/xen-hvm-common.h +0 -1
@@ -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"
include/qemu/qtree.h +0 -1
@@ -42,7 +42,6 @@#ifndef QEMU_QTREE_H #define QEMU_QTREE_H -#include "qemu/osdep.h" #ifdef HAVE_GLIB_WITH_SLICE_ALLOCATOR
include/ui/rect.h +0 -2
@@ -4,8 +4,6 @@ #ifndef QEMU_RECT_H #define QEMU_RECT_H -#include <stdint.h> -#include <stdbool.h> typedef struct QemuRect { int16_t x;
Signature · 1 line
2.34.1
Re: [PATCH 07/10] include: Clean up includes
Quoted 21 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:05 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 07/10] include: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git includeinclude/*/*.hinclude/*/*/*.hAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>---
I hand-checked that all these headers are included only by .c files which already haveosdep.hincluded.
Quoted 8 lines
--- 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(-)
Quoted 78 lines
include/hw/arm/raspberrypi-fw-defs.h +0
-1@@ -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,include/hw/mem/memory-device.h +0
-1@@ -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" include/hw/ppc/spapr_nested.h +0
-1@@ -1,7 +1,6 @@#ifndef HW_SPAPR_NESTED_H #define HW_SPAPR_NESTED_H -#include "qemu/osdep.h" #include "target/ppc/cpu.h" /* include/hw/xen/xen-hvm-common.h +0
-1@@ -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" include/qemu/qtree.h +0
-1@@ -42,7 +42,6 @@#ifndef QEMU_QTREE_H #define QEMU_QTREE_H -#include "qemu/osdep.h" #ifdef HAVE_GLIB_WITH_SLICE_ALLOCATOR include/ui/rect.h +0
-2@@ -4,8 +4,6 @@ #ifndef QEMU_RECT_H #define QEMU_RECT_H -#include <stdint.h> -#include <stdbool.h> typedef struct QemuRect { int16_t x;Signature · 1 line
2.34.1
PATCH 8/10 cxl: Clean up includes
In reply to Peter MaydellThis 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.
--- hw/cxl/cxl-events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
hw/cxl/cxl-events.c +1 -3
@@ -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"
Signature · 1 line
2.34.1
Re: [PATCH 08/10] cxl: Clean up includes
Quoted 11 lines · Peter Maydell
This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 4 lines
Signed-off-by Peter Maydell <[email protected]>--- hw/cxl/cxl-events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Re: [PATCH 08/10] cxl: Clean up includes
In reply to Peter MaydellQuoted 16 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:06 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 08/10] cxl: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 4 lines
Signed-off-by Peter Maydell <[email protected]>--- hw/cxl/cxl-events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 22 lines
hw/cxl/cxl-events.c +1
-3@@ -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" Signature · 1 line
2.34.1
Re: [PATCH 08/10] cxl: Clean up includes
In reply to Peter MaydellQuoted 5 lines · On Thu, 25 Jan 2024 16:34:06 +0000 Peter Maydell <[email protected]>…
This commit was created with
scripts/clean-includes.All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:
Quoted 7 lines
* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>
Quoted 21 lines
--- hw/cxl/cxl-events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)hw/cxl/cxl-events.c +1
-3@@ -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"
PATCH 9/10 riscv: Clean up includes
In reply to Peter MaydellThis 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.
--- target/riscv/vector_internals.h | 1 - target/riscv/vector_internals.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
target/riscv/vector_internals.h +0 -1
@@ -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"
target/riscv/vector_internals.c +1 -0
@@ -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 */
Signature · 1 line
2.34.1
Re: [PATCH 09/10] riscv: Clean up includes
Quoted 12 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git riscv target/riscv/*.[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>--- target/riscv/vector_internals.h | 1 - target/riscv/vector_internals.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
Re: [PATCH 09/10] riscv: Clean up includes
In reply to Peter MaydellQuoted 17 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:07 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 09/10] riscv: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git riscv target/riscv/*.[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>--- target/riscv/vector_internals.h | 1 - target/riscv/vector_internals.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
Quoted 29 lines
target/riscv/vector_internals.h +0
-1@@ -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" target/riscv/vector_internals.c +1
-0@@ -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 */ Signature · 1 line
2.34.1
Re: [PATCH 09/10] riscv: Clean up includes
In reply to Peter MaydellQuoted 7 lines · Peter Maydell
This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git riscv target/riscv/*.[ch]All .c should include
qemu/osdep.hfirst. The script performs three related cleanups:
Quoted 7 lines
* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>
Alistair
Quoted 33 lines
--- target/riscv/vector_internals.h | 1 - target/riscv/vector_internals.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)target/riscv/vector_internals.h +0
-1@@ -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" target/riscv/vector_internals.c +1
-1@@ -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
PATCH 10/10 misc: Clean up includes
In reply to Peter MaydellThis 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.
---
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(-)
audio/pwaudio.c +0 -1
@@ -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>
net/af-xdp.c +0 -1
@@ -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>
plugins/core.c +0 -1
@@ -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;
plugins/loader.c +0 -1
@@ -33,7 +33,6 @@#ifndef CONFIG_USER_ONLY #include "hw/boards.h" #endif -#include "qemu/compiler.h" #include "plugin.h"
util/userfaultfd.c +0 -1
@@ -18,7 +18,6 @@#include <poll.h> #include <sys/syscall.h> #include <sys/ioctl.h> -#include <fcntl.h> typedef enum { UFFD_UNINITIALIZED = 0,
Signature · 1 line
2.34.1
Re: [PATCH 10/10] misc: Clean up includes
Quoted 20 lines · Peter Maydell
Date: Thu, 25 Jan 2024 16:34:08 +0000
From: Peter Maydell <[email protected]>
Subject: [PATCH 10/10] misc: Clean up includes
X-Mailer: git-send-email 2.34.1This commit was created with
scripts/clean-includes:
./scripts/clean-includes--git miscnet/af-xdp.cplugins/*.caudio/pwaudio.cutil/userfaultfd.cAll .c should include
qemu/osdep.hfirst. The script performs three related cleanups:* Ensure .c files include
qemu/osdep.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes is redundant. Drop these, too.Signed-off-by Peter Maydell <[email protected]>---
These are all cases where files include things osdep already gives them.
Quoted 7 lines
--- 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(-)
Quoted 65 lines
audio/pwaudio.c +0
-1@@ -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> net/af-xdp.c +0
-1@@ -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> plugins/core.c +0
-1@@ -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;plugins/loader.c +0
-1@@ -33,7 +33,6 @@#ifndef CONFIG_USER_ONLY #include "hw/boards.h" #endif -#include "qemu/compiler.h" #include "plugin.h" util/userfaultfd.c +0
-1@@ -18,7 +18,6 @@#include <poll.h> #include <sys/syscall.h> #include <sys/ioctl.h> -#include <fcntl.h> typedef enum { UFFD_UNINITIALIZED = 0,Signature · 1 line
2.34.1
Michael Tokarev
Applied25.01.2024 19:33, Peter Maydell :
Quoted 25 lines
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.hfirst.
* Including it in a .h is redundant, since the .c already includes it. Drop such inclusions.
* Likewise, including headersqemu/osdep.hincludes 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
Quoted 11 lines
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