All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 00/21] Includes cleanup
@ 2018-05-28 23:26 Philippe Mathieu-Daudé
  2018-05-28 23:26 ` [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file Philippe Mathieu-Daudé
                   ` (21 more replies)
  0 siblings, 22 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:26 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-trivial, Paolo Bonzini

Hi,

I split the previous series "Use the BYTE-based definitions when useful",
this is the first generic part, only headers cleanup, which is big enough.

Many patches, but "12 insertions(+), 145 deletions(-)" \o/

v3 was:
http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg02049.html

Philippe Mathieu-Daudé (21):
  vfio: Include "exec/address-spaces.h" directly in the source file
  accel: Do not include "exec/address-spaces.h" if it is not necessary
  target: Do not include "exec/address-spaces.h" if it is not necessary
  memory: Do not include "exec/ioport.h" if it is not necessary
  target/i386: Do not include "exec/ioport.h" if it is not necessary
  target/xtensa: Include "qemu/timer.h" to use NANOSECONDS_PER_SECOND
  target/ppc: Include "exec/exec-all.h" which provides tlb_flush()
  target/hppa: Include "qemu/log.h" to use qemu_log()
  target: Do not include "exec/exec-all.h" if it is not necessary
  hw: Do not include "exec/ioport.h" if it is not necessary
  hw: Do not include "exec/address-spaces.h" if it is not necessary
  hw: Do not include "sysemu/block-backend.h" if it is not necessary
  hw: Do not include "sysemu/blockdev.h" if it is not necessary
  hw: Do not include "sysemu/blockdev.h" if it is not necessary
  hw/block/nvme: Include "qemu/cutils.h" directly in the source file
  hw/misc/mips_itu: Cleanup includes
  hw/misc/sga: Use the correct ISA include
  hw/hppa: Remove unused include
  hw/i386/pc: Remove unused include
  hw/ide: Remove unused include
  hw: Clean "hw/devices.h" includes

 bsd-user/qemu.h                          | 1 -
 hw/block/nvme.h                          | 1 -
 hw/hppa/hppa_sys.h                       | 1 -
 include/hw/arm/allwinner-a10.h           | 1 -
 include/hw/arm/bcm2835_peripherals.h     | 1 -
 include/hw/devices.h                     | 7 ++-----
 include/hw/display/bcm2835_fb.h          | 1 -
 include/hw/dma/bcm2835_dma.h             | 1 -
 include/hw/misc/bcm2835_mbox.h           | 1 -
 include/hw/misc/bcm2835_property.h       | 1 -
 include/hw/misc/mips_itu.h               | 2 ++
 include/hw/sh4/sh_intc.h                 | 1 -
 include/hw/vfio/vfio-common.h            | 1 -
 include/hw/virtio/virtio-access.h        | 1 -
 target/arm/arm_ldst.h                    | 1 -
 target/ppc/helper_regs.h                 | 1 +
 accel/tcg/cpu-exec.c                     | 1 -
 hw/acpi/pcihp.c                          | 1 -
 hw/acpi/piix4.c                          | 1 -
 hw/arm/aspeed.c                          | 1 -
 hw/arm/bcm2836.c                         | 1 -
 hw/arm/collie.c                          | 1 -
 hw/arm/gumstix.c                         | 1 -
 hw/arm/mainstone.c                       | 1 -
 hw/arm/nseries.c                         | 1 -
 hw/arm/omap1.c                           | 2 --
 hw/arm/omap2.c                           | 2 --
 hw/arm/omap_sx1.c                        | 1 -
 hw/arm/pxa2xx.c                          | 1 -
 hw/arm/spitz.c                           | 1 -
 hw/arm/versatilepb.c                     | 1 -
 hw/arm/vexpress.c                        | 1 -
 hw/arm/virt.c                            | 1 -
 hw/arm/xilinx_zynq.c                     | 1 -
 hw/arm/xlnx-zcu102.c                     | 1 -
 hw/arm/z2.c                              | 1 -
 hw/block/dataplane/virtio-blk.c          | 1 -
 hw/block/m25p80.c                        | 1 -
 hw/block/nvme.c                          | 1 +
 hw/block/onenand.c                       | 2 --
 hw/block/pflash_cfi01.c                  | 1 -
 hw/block/pflash_cfi02.c                  | 1 -
 hw/block/virtio-blk.c                    | 1 -
 hw/char/mcf_uart.c                       | 1 -
 hw/char/serial.c                         | 1 -
 hw/char/sh_serial.c                      | 1 -
 hw/core/loader-fit.c                     | 1 -
 hw/core/platform-bus.c                   | 1 -
 hw/core/qdev-properties.c                | 1 -
 hw/cris/axis_dev88.c                     | 1 -
 hw/display/sm501.c                       | 1 -
 hw/display/tc6393xb.c                    | 1 -
 hw/i386/kvmvapic.c                       | 1 -
 hw/i386/pc.c                             | 1 -
 hw/i386/xen/xen-mapcache.c               | 1 -
 hw/ide/core.c                            | 1 -
 hw/ide/pci.c                             | 1 -
 hw/ide/via.c                             | 1 -
 hw/isa/isa-superio.c                     | 1 -
 hw/lm32/lm32_boards.c                    | 1 -
 hw/lm32/milkymist.c                      | 1 -
 hw/m68k/mcf5206.c                        | 1 -
 hw/m68k/mcf_intc.c                       | 1 -
 hw/microblaze/petalogix_ml605_mmu.c      | 1 -
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
 hw/mips/mips_malta.c                     | 1 -
 hw/mips/mips_r4k.c                       | 1 -
 hw/misc/arm_integrator_debug.c           | 1 -
 hw/misc/mips_itu.c                       | 5 +----
 hw/misc/sga.c                            | 2 +-
 hw/net/mcf_fec.c                         | 1 -
 hw/net/ne2000-isa.c                      | 1 -
 hw/pci-host/versatile.c                  | 1 -
 hw/ppc/ppc405_boards.c                   | 1 -
 hw/ppc/sam460ex.c                        | 1 -
 hw/ppc/spapr.c                           | 1 -
 hw/ppc/virtex_ml507.c                    | 2 --
 hw/riscv/riscv_htif.c                    | 1 -
 hw/s390x/virtio-ccw.c                    | 2 --
 hw/scsi/mptsas.c                         | 1 -
 hw/scsi/scsi-generic.c                   | 1 -
 hw/sd/pl181.c                            | 1 -
 hw/sd/sdhci.c                            | 2 --
 hw/sd/ssi-sd.c                           | 1 -
 hw/sh4/r2d.c                             | 1 -
 hw/sh4/sh7750.c                          | 1 -
 hw/timer/sh_timer.c                      | 1 -
 hw/usb/dev-storage.c                     | 1 -
 hw/vfio/ccw.c                            | 1 +
 hw/vfio/platform.c                       | 1 +
 hw/virtio/virtio-pci.c                   | 1 -
 hw/xen/xen_devconfig.c                   | 1 -
 hw/xtensa/xtfpga.c                       | 1 -
 memory.c                                 | 1 -
 monitor.c                                | 1 -
 target/arm/arm-powerctl.c                | 1 -
 target/arm/crypto_helper.c               | 1 -
 target/arm/iwmmxt_helper.c               | 1 -
 target/arm/neon_helper.c                 | 1 -
 target/arm/psci.c                        | 1 -
 target/arm/vec_helper.c                  | 1 -
 target/cris/cpu.c                        | 1 -
 target/hppa/helper.c                     | 1 -
 target/hppa/int_helper.c                 | 2 +-
 target/i386/hax-all.c                    | 2 --
 target/i386/hax-mem.c                    | 1 -
 target/i386/hax-windows.c                | 1 -
 target/i386/hvf/hvf.c                    | 2 --
 target/i386/hvf/x86_task.c               | 3 ---
 target/i386/kvm.c                        | 1 -
 target/i386/whpx-all.c                   | 1 -
 target/lm32/cpu.c                        | 1 -
 target/m68k/cpu.c                        | 1 -
 target/moxie/cpu.c                       | 1 -
 target/moxie/mmu.c                       | 1 -
 target/openrisc/cpu.c                    | 1 -
 target/ppc/int_helper.c                  | 1 -
 target/s390x/cpu.c                       | 1 -
 target/s390x/diag.c                      | 1 -
 target/s390x/helper.c                    | 1 -
 target/s390x/kvm.c                       | 1 -
 target/s390x/mem_helper.c                | 1 -
 target/s390x/misc_helper.c               | 1 -
 target/sparc/mmu_helper.c                | 1 -
 target/tilegx/cpu.c                      | 1 -
 target/xtensa/core-dc232b.c              | 2 +-
 target/xtensa/core-dc233c.c              | 1 -
 target/xtensa/core-de212.c               | 1 -
 target/xtensa/core-fsf.c                 | 1 -
 target/xtensa/core-sample_controller.c   | 1 -
 target/xtensa/cpu.c                      | 1 -
 tcg/tcg-op-vec.c                         | 1 -
 target/xtensa/import_core.sh             | 1 -
 133 files changed, 12 insertions(+), 145 deletions(-)

-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
@ 2018-05-28 23:26 ` Philippe Mathieu-Daudé
  2018-05-28 23:48   ` Alex Williamson
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary Philippe Mathieu-Daudé
                   ` (20 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:26 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Cornelia Huck,
	Alex Williamson, open list:S390

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/hw/vfio/vfio-common.h | 1 -
 hw/vfio/ccw.c                 | 1 +
 hw/vfio/platform.c            | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index d9360148e6..8264a65fa5 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -22,7 +22,6 @@
 #define HW_VFIO_VFIO_COMMON_H
 
 #include "qemu-common.h"
-#include "exec/address-spaces.h"
 #include "exec/memory.h"
 #include "qemu/queue.h"
 #include "qemu/notify.h"
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index e67392c5f9..76e4e8c652 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -22,6 +22,7 @@
 #include "hw/vfio/vfio-common.h"
 #include "hw/s390x/s390-ccw.h"
 #include "hw/s390x/ccw-device.h"
+#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 
 #define TYPE_VFIO_CCW "vfio-ccw"
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 5c921c27ba..57c4a0ee2b 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -24,6 +24,7 @@
 #include "qemu/range.h"
 #include "sysemu/sysemu.h"
 #include "exec/memory.h"
+#include "exec/address-spaces.h"
 #include "qemu/queue.h"
 #include "hw/sysbus.h"
 #include "trace.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
  2018-05-28 23:26 ` [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 03/21] target: " Philippe Mathieu-Daudé
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Peter Crosthwaite,
	Richard Henderson

Code change produced with:
    $ git grep '#include "exec/address-spaces.h"' accel | \
      cut -d: -f-1 | \
      xargs egrep -L "(get_system_|address_space_)" | \
      xargs sed -i.bak '/#include "exec\/address-spaces.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 accel/tcg/cpu-exec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 0b154cc678..4ef95d8dd3 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -25,7 +25,6 @@
 #include "qemu/atomic.h"
 #include "sysemu/qtest.h"
 #include "qemu/timer.h"
-#include "exec/address-spaces.h"
 #include "qemu/rcu.h"
 #include "exec/tb-hash.h"
 #include "exec/tb-lookup.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 03/21] target: Do not include "exec/address-spaces.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
  2018-05-28 23:26 ` [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29 10:05   ` Cornelia Huck
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 04/21] memory: Do not include "exec/ioport.h" " Philippe Mathieu-Daudé
                   ` (18 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Christian Borntraeger, Cornelia Huck,
	Alexander Graf, David Hildenbrand, Mark Cave-Ayland,
	Artyom Tarasenko, open list:S390

Code change produced with:
    $ git grep '#include "exec/address-spaces.h"' target | \
      cut -d: -f-1 | \
      xargs egrep -L "(get_system_|address_space_)" | \
      xargs sed -i.bak '/#include "exec\/address-spaces.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/i386/hvf/x86_task.c | 1 -
 target/s390x/kvm.c         | 1 -
 target/s390x/mem_helper.c  | 1 -
 target/s390x/misc_helper.c | 1 -
 target/sparc/mmu_helper.c  | 1 -
 5 files changed, 5 deletions(-)

diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c
index 4abf3db25e..c3ead2ca73 100644
--- a/target/i386/hvf/x86_task.c
+++ b/target/i386/hvf/x86_task.c
@@ -26,7 +26,6 @@
 #include <Hypervisor/hv.h>
 #include <Hypervisor/hv_vmx.h>
 
-#include "exec/address-spaces.h"
 #include "exec/exec-all.h"
 #include "exec/ioport.h"
 #include "hw/i386/apic_internal.h"
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 58e4380ae3..ac370da281 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -39,7 +39,6 @@
 #include "hw/hw.h"
 #include "sysemu/device_tree.h"
 #include "exec/gdbstub.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "hw/s390x/s390-pci-inst.h"
 #include "hw/s390x/s390-pci-bus.h"
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index a0e28bd124..e21a47fb4d 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -21,7 +21,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "internal.h"
-#include "exec/address-spaces.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 1f834f35ef..de1ced2082 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -26,7 +26,6 @@
 #include "qemu/host-utils.h"
 #include "exec/helper-proto.h"
 #include "qemu/timer.h"
-#include "exec/address-spaces.h"
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
 
diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c
index f8886ae039..135a9c9d9b 100644
--- a/target/sparc/mmu_helper.c
+++ b/target/sparc/mmu_helper.c
@@ -21,7 +21,6 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "trace.h"
-#include "exec/address-spaces.h"
 
 /* Sparc MMU emulation */
 
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 04/21] memory: Do not include "exec/ioport.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 03/21] target: " Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27   ` [Qemu-devel] " Philippe Mathieu-Daudé
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-trivial, Paolo Bonzini

Code change produced with:
    $ git grep '#include "exec/ioport.h"' memory.c | \
      cut -d: -f-1 | \
      xargs egrep -Li "(portio|cpu_(in|out).\()" | \
      xargs sed -i.bak '/#include "exec\/ioport.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 memory.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/memory.c b/memory.c
index fc7f9b782b..7ead90f8cd 100644
--- a/memory.c
+++ b/memory.c
@@ -19,7 +19,6 @@
 #include "cpu.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
-#include "exec/ioport.h"
 #include "qapi/visitor.h"
 #include "qemu/bitops.h"
 #include "qemu/error-report.h"
-- 
2.17.0

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

* [PATCH v4 05/21] target/i386: Do not include "exec/ioport.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
@ 2018-05-28 23:27   ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary Philippe Mathieu-Daudé
                     ` (20 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Eduardo Habkost, open list:X86, qemu-trivial, Marcelo Tosatti,
	Philippe Mathieu-Daudé,
	qemu-devel, Paolo Bonzini, Richard Henderson

Code change produced with:
    $ git grep '#include "exec/ioport.h"' target | \
      cut -d: -f-1 | \
      xargs egrep -Li "(portio|cpu_(in|out).\()" | \
      xargs sed -i.bak '/#include "exec\/ioport.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/i386/hax-all.c      | 1 -
 target/i386/hvf/hvf.c      | 1 -
 target/i386/hvf/x86_task.c | 1 -
 target/i386/kvm.c          | 1 -
 4 files changed, 4 deletions(-)

diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index cad7531406..c5856bbdc3 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -27,7 +27,6 @@
 #include "cpu.h"
 #include "exec/address-spaces.h"
 #include "exec/exec-all.h"
-#include "exec/ioport.h"
 
 #include "qemu-common.h"
 #include "hax-i386.h"
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index c36753954b..f6c872e678 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -66,7 +66,6 @@
 
 #include "exec/address-spaces.h"
 #include "exec/exec-all.h"
-#include "exec/ioport.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c
index c3ead2ca73..7610d85802 100644
--- a/target/i386/hvf/x86_task.c
+++ b/target/i386/hvf/x86_task.c
@@ -27,7 +27,6 @@
 #include <Hypervisor/hv_vmx.h>
 
 #include "exec/exec-all.h"
-#include "exec/ioport.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 6511329d11..9d8f80f4c0 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -40,7 +40,6 @@
 #include "hw/i386/intel_iommu.h"
 #include "hw/i386/x86-iommu.h"
 
-#include "exec/ioport.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 05/21] target/i386: Do not include "exec/ioport.h" if it is not necessary
@ 2018-05-28 23:27   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Marcelo Tosatti, open list:X86

Code change produced with:
    $ git grep '#include "exec/ioport.h"' target | \
      cut -d: -f-1 | \
      xargs egrep -Li "(portio|cpu_(in|out).\()" | \
      xargs sed -i.bak '/#include "exec\/ioport.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/i386/hax-all.c      | 1 -
 target/i386/hvf/hvf.c      | 1 -
 target/i386/hvf/x86_task.c | 1 -
 target/i386/kvm.c          | 1 -
 4 files changed, 4 deletions(-)

diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index cad7531406..c5856bbdc3 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -27,7 +27,6 @@
 #include "cpu.h"
 #include "exec/address-spaces.h"
 #include "exec/exec-all.h"
-#include "exec/ioport.h"
 
 #include "qemu-common.h"
 #include "hax-i386.h"
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index c36753954b..f6c872e678 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -66,7 +66,6 @@
 
 #include "exec/address-spaces.h"
 #include "exec/exec-all.h"
-#include "exec/ioport.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c
index c3ead2ca73..7610d85802 100644
--- a/target/i386/hvf/x86_task.c
+++ b/target/i386/hvf/x86_task.c
@@ -27,7 +27,6 @@
 #include <Hypervisor/hv_vmx.h>
 
 #include "exec/exec-all.h"
-#include "exec/ioport.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 6511329d11..9d8f80f4c0 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -40,7 +40,6 @@
 #include "hw/i386/intel_iommu.h"
 #include "hw/i386/x86-iommu.h"
 
-#include "exec/ioport.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 06/21] target/xtensa: Include "qemu/timer.h" to use NANOSECONDS_PER_SECOND
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2018-05-28 23:27   ` [Qemu-devel] " Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 07/21] target/ppc: Include "exec/exec-all.h" which provides tlb_flush() Philippe Mathieu-Daudé
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Max Filippov

Since d0ce7e9cfc the dc232b structure uses the NANOSECONDS_PER_SECOND
definition from "qemu/timer.h".  Include it to allow further includes
cleanup.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/xtensa/core-dc232b.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c
index 7331eeea2f..70f33622ec 100644
--- a/target/xtensa/core-dc232b.c
+++ b/target/xtensa/core-dc232b.c
@@ -30,6 +30,7 @@
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu/host-utils.h"
+#include "qemu/timer.h"
 
 #include "core-dc232b/core-isa.h"
 #include "overlay_tool.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 07/21] target/ppc: Include "exec/exec-all.h" which provides tlb_flush()
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 06/21] target/xtensa: Include "qemu/timer.h" to use NANOSECONDS_PER_SECOND Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 08/21] target/hppa: Include "qemu/log.h" to use qemu_log() Philippe Mathieu-Daudé
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, David Gibson,
	Alexander Graf, open list:PowerPC

Since it inception this include uses tlb_flush() declared in "exec/exec-all.h".
Include the other header to allow further includes cleanup.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/ppc/helper_regs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/ppc/helper_regs.h b/target/ppc/helper_regs.h
index 84fd30c2db..5efd18049e 100644
--- a/target/ppc/helper_regs.h
+++ b/target/ppc/helper_regs.h
@@ -21,6 +21,7 @@
 #define HELPER_REGS_H
 
 #include "qemu/main-loop.h"
+#include "exec/exec-all.h"
 
 /* Swap temporary saved registers with GPRs */
 static inline void hreg_swap_gpr_tgpr(CPUPPCState *env)
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 08/21] target/hppa: Include "qemu/log.h" to use qemu_log()
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 07/21] target/ppc: Include "exec/exec-all.h" which provides tlb_flush() Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary Philippe Mathieu-Daudé
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson

Since his inception in 61766fe9e2d, this file uses the qemu_log()
API from "qemu/log.h".  Include it to allow further includes
cleanup.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/hppa/int_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
index 787f3d6357..561bf6eb60 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
+#include "qemu/log.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (7 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 08/21] target/hppa: Include "qemu/log.h" to use qemu_log() Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29 11:40   ` Cornelia Huck
  2018-05-30 10:12   ` Cornelia Huck
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 10/21] hw: Do not include "exec/ioport.h" " Philippe Mathieu-Daudé
                   ` (12 subsequent siblings)
  21 siblings, 2 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Marcel Apfelbaum, Peter Maydell,
	Edgar E. Iglesias, Michael Walle, Laurent Vivier, Anthony Green,
	Stafford Horne, David Gibson, Alexander Graf, David Hildenbrand,
	Cornelia Huck, Max Filippov, open list:ARM, open list:PowerPC,
	open list:S390

Code change produced with:
    $ git grep '#include "exec/exec-all.h"' | \
      cut -d: -f-1 | \
      xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \
      xargs sed -i.bak '/#include "exec\/exec-all.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 bsd-user/qemu.h                        | 1 -
 target/arm/arm_ldst.h                  | 1 -
 hw/i386/kvmvapic.c                     | 1 -
 target/arm/arm-powerctl.c              | 1 -
 target/arm/crypto_helper.c             | 1 -
 target/arm/iwmmxt_helper.c             | 1 -
 target/arm/neon_helper.c               | 1 -
 target/arm/psci.c                      | 1 -
 target/arm/vec_helper.c                | 1 -
 target/cris/cpu.c                      | 1 -
 target/hppa/helper.c                   | 1 -
 target/hppa/int_helper.c               | 1 -
 target/i386/hax-all.c                  | 1 -
 target/i386/hax-mem.c                  | 1 -
 target/i386/hax-windows.c              | 1 -
 target/i386/hvf/hvf.c                  | 1 -
 target/i386/hvf/x86_task.c             | 1 -
 target/i386/whpx-all.c                 | 1 -
 target/lm32/cpu.c                      | 1 -
 target/m68k/cpu.c                      | 1 -
 target/moxie/cpu.c                     | 1 -
 target/moxie/mmu.c                     | 1 -
 target/openrisc/cpu.c                  | 1 -
 target/ppc/int_helper.c                | 1 -
 target/s390x/cpu.c                     | 1 -
 target/s390x/diag.c                    | 1 -
 target/s390x/helper.c                  | 1 -
 target/tilegx/cpu.c                    | 1 -
 target/xtensa/core-dc232b.c            | 1 -
 target/xtensa/core-dc233c.c            | 1 -
 target/xtensa/core-de212.c             | 1 -
 target/xtensa/core-fsf.c               | 1 -
 target/xtensa/core-sample_controller.c | 1 -
 target/xtensa/cpu.c                    | 1 -
 tcg/tcg-op-vec.c                       | 1 -
 target/xtensa/import_core.sh           | 1 -
 36 files changed, 36 deletions(-)

diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 19b2b8fecb..09e8aed9c7 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -19,7 +19,6 @@
 
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
 
 #undef DEBUG_REMAP
diff --git a/target/arm/arm_ldst.h b/target/arm/arm_ldst.h
index 01587b3ebb..5e0ac8bef0 100644
--- a/target/arm/arm_ldst.h
+++ b/target/arm/arm_ldst.h
@@ -20,7 +20,6 @@
 #ifndef ARM_LDST_H
 #define ARM_LDST_H
 
-#include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
 #include "qemu/bswap.h"
 
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index fc962c5fbc..70f6f26a94 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -11,7 +11,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/cpus.h"
 #include "sysemu/hw_accel.h"
diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c
index 25207cb850..ce55eeb682 100644
--- a/target/arm/arm-powerctl.c
+++ b/target/arm/arm-powerctl.c
@@ -15,7 +15,6 @@
 #include "arm-powerctl.h"
 #include "qemu/log.h"
 #include "qemu/main-loop.h"
-#include "exec/exec-all.h"
 
 #ifndef DEBUG_ARM_POWERCTL
 #define DEBUG_ARM_POWERCTL 0
diff --git a/target/arm/crypto_helper.c b/target/arm/crypto_helper.c
index cc339ea7e0..f800266727 100644
--- a/target/arm/crypto_helper.c
+++ b/target/arm/crypto_helper.c
@@ -12,7 +12,6 @@
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "crypto/aes.h"
 
diff --git a/target/arm/iwmmxt_helper.c b/target/arm/iwmmxt_helper.c
index 7d87e1a0a8..f6a4fc5b7f 100644
--- a/target/arm/iwmmxt_helper.c
+++ b/target/arm/iwmmxt_helper.c
@@ -22,7 +22,6 @@
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 
 /* iwMMXt macros extracted from GNU gdb.  */
diff --git a/target/arm/neon_helper.c b/target/arm/neon_helper.c
index a1ec6537eb..c2c6491a83 100644
--- a/target/arm/neon_helper.c
+++ b/target/arm/neon_helper.c
@@ -9,7 +9,6 @@
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "fpu/softfloat.h"
 
diff --git a/target/arm/psci.c b/target/arm/psci.c
index eb7b88e926..a74d78802a 100644
--- a/target/arm/psci.c
+++ b/target/arm/psci.c
@@ -22,7 +22,6 @@
 #include "sysemu/sysemu.h"
 #include "internals.h"
 #include "arm-powerctl.h"
-#include "exec/exec-all.h"
 
 bool arm_is_psci_call(ARMCPU *cpu, int excp_type)
 {
diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
index ec705cfca5..25e209da31 100644
--- a/target/arm/vec_helper.c
+++ b/target/arm/vec_helper.c
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "tcg/tcg-gvec-desc.h"
 #include "fpu/softfloat.h"
diff --git a/target/cris/cpu.c b/target/cris/cpu.c
index db8d0884a1..a23aba2688 100644
--- a/target/cris/cpu.c
+++ b/target/cris/cpu.c
@@ -26,7 +26,6 @@
 #include "cpu.h"
 #include "qemu-common.h"
 #include "mmu.h"
-#include "exec/exec-all.h"
 
 
 static void cris_cpu_set_pc(CPUState *cs, vaddr value)
diff --git a/target/hppa/helper.c b/target/hppa/helper.c
index 858ec205b6..6539061e52 100644
--- a/target/hppa/helper.c
+++ b/target/hppa/helper.c
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "fpu/softfloat.h"
 #include "exec/helper-proto.h"
 
diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
index 561bf6eb60..8d5edd3a20 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -21,7 +21,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/log.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "qom/cpu.h"
 
diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index c5856bbdc3..d2e512856b 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -26,7 +26,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/address-spaces.h"
-#include "exec/exec-all.h"
 
 #include "qemu-common.h"
 #include "hax-i386.h"
diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c
index f46e85544d..5c37e94caa 100644
--- a/target/i386/hax-mem.c
+++ b/target/i386/hax-mem.c
@@ -11,7 +11,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/address-spaces.h"
-#include "exec/exec-all.h"
 #include "qemu/error-report.h"
 
 #include "target/i386/hax-i386.h"
diff --git a/target/i386/hax-windows.c b/target/i386/hax-windows.c
index b1ac737ae4..5729ad9b48 100644
--- a/target/i386/hax-windows.c
+++ b/target/i386/hax-windows.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "hax-i386.h"
 
 /*
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index f6c872e678..df69e6d0a7 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -65,7 +65,6 @@
 #include <Hypervisor/hv_vmx.h>
 
 #include "exec/address-spaces.h"
-#include "exec/exec-all.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
diff --git a/target/i386/hvf/x86_task.c b/target/i386/hvf/x86_task.c
index 7610d85802..7099335e89 100644
--- a/target/i386/hvf/x86_task.c
+++ b/target/i386/hvf/x86_task.c
@@ -26,7 +26,6 @@
 #include <Hypervisor/hv.h>
 #include <Hypervisor/hv_vmx.h>
 
-#include "exec/exec-all.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
index 58435178a4..bd7df10ba5 100644
--- a/target/i386/whpx-all.c
+++ b/target/i386/whpx-all.c
@@ -11,7 +11,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/address-spaces.h"
-#include "exec/exec-all.h"
 #include "exec/ioport.h"
 #include "qemu-common.h"
 #include "strings.h"
diff --git a/target/lm32/cpu.c b/target/lm32/cpu.c
index 0003152469..b7499cb627 100644
--- a/target/lm32/cpu.c
+++ b/target/lm32/cpu.c
@@ -22,7 +22,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "qemu-common.h"
-#include "exec/exec-all.h"
 
 
 static void lm32_cpu_set_pc(CPUState *cs, vaddr value)
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index a4ed8770aa..582e3a73b3 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -23,7 +23,6 @@
 #include "cpu.h"
 #include "qemu-common.h"
 #include "migration/vmstate.h"
-#include "exec/exec-all.h"
 #include "fpu/softfloat.h"
 
 static void m68k_cpu_set_pc(CPUState *cs, vaddr value)
diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c
index 4170284da6..8d67eb6727 100644
--- a/target/moxie/cpu.c
+++ b/target/moxie/cpu.c
@@ -23,7 +23,6 @@
 #include "qemu-common.h"
 #include "migration/vmstate.h"
 #include "machine.h"
-#include "exec/exec-all.h"
 
 static void moxie_cpu_set_pc(CPUState *cs, vaddr value)
 {
diff --git a/target/moxie/mmu.c b/target/moxie/mmu.c
index 9203330b3b..bd90b1eebc 100644
--- a/target/moxie/mmu.c
+++ b/target/moxie/mmu.c
@@ -21,7 +21,6 @@
 
 #include "cpu.h"
 #include "mmu.h"
-#include "exec/exec-all.h"
 
 int moxie_mmu_translate(MoxieMMUResult *res,
                        CPUMoxieState *env, uint32_t vaddr,
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index 20b115afae..a692a98ec0 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -21,7 +21,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "qemu-common.h"
-#include "exec/exec-all.h"
 
 static void openrisc_cpu_set_pc(CPUState *cs, vaddr value)
 {
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index 1607a7a42b..03d37da79f 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -19,7 +19,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "internal.h"
-#include "exec/exec-all.h"
 #include "qemu/host-utils.h"
 #include "exec/helper-proto.h"
 #include "crypto/aes.h"
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index c2b775f4eb..c268065887 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -38,7 +38,6 @@
 #include "qapi/qapi-visit-misc.h"
 #include "qapi/qapi-visit-run-state.h"
 #include "sysemu/hw_accel.h"
-#include "exec/exec-all.h"
 #include "hw/qdev-properties.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/hw.h"
diff --git a/target/s390x/diag.c b/target/s390x/diag.c
index ac2c40f363..0a1fabee51 100644
--- a/target/s390x/diag.c
+++ b/target/s390x/diag.c
@@ -16,7 +16,6 @@
 #include "cpu.h"
 #include "internal.h"
 #include "exec/address-spaces.h"
-#include "exec/exec-all.h"
 #include "hw/watchdog/wdt_diag288.h"
 #include "sysemu/cpus.h"
 #include "hw/s390x/ipl.h"
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index fd5791f134..254631693d 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -23,7 +23,6 @@
 #include "internal.h"
 #include "exec/gdbstub.h"
 #include "qemu/timer.h"
-#include "exec/exec-all.h"
 #include "hw/s390x/ioinst.h"
 #include "sysemu/hw_accel.h"
 #ifndef CONFIG_USER_ONLY
diff --git a/target/tilegx/cpu.c b/target/tilegx/cpu.c
index b7451bdcf2..bfe9be59b5 100644
--- a/target/tilegx/cpu.c
+++ b/target/tilegx/cpu.c
@@ -24,7 +24,6 @@
 #include "qemu-common.h"
 #include "hw/qdev-properties.h"
 #include "linux-user/syscall_defs.h"
-#include "exec/exec-all.h"
 
 static void tilegx_cpu_dump_state(CPUState *cs, FILE *f,
                                   fprintf_function cpu_fprintf, int flags)
diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c
index 70f33622ec..7131337840 100644
--- a/target/xtensa/core-dc232b.c
+++ b/target/xtensa/core-dc232b.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu/host-utils.h"
 #include "qemu/timer.h"
diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c
index 8296e6fa10..d701e3f5de 100644
--- a/target/xtensa/core-dc233c.c
+++ b/target/xtensa/core-dc233c.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
diff --git a/target/xtensa/core-de212.c b/target/xtensa/core-de212.c
index 53775a97fa..7322179b56 100644
--- a/target/xtensa/core-de212.c
+++ b/target/xtensa/core-de212.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
diff --git a/target/xtensa/core-fsf.c b/target/xtensa/core-fsf.c
index 01932bdc8b..e100e212b9 100644
--- a/target/xtensa/core-fsf.c
+++ b/target/xtensa/core-fsf.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
diff --git a/target/xtensa/core-sample_controller.c b/target/xtensa/core-sample_controller.c
index c622335ca5..f433ea8d66 100644
--- a/target/xtensa/core-sample_controller.c
+++ b/target/xtensa/core-sample_controller.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 2b5b537222..b50c840e09 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -33,7 +33,6 @@
 #include "cpu.h"
 #include "qemu-common.h"
 #include "migration/vmstate.h"
-#include "exec/exec-all.h"
 
 
 static void xtensa_cpu_set_pc(CPUState *cs, vaddr value)
diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c
index 2ca219734d..cefba3d185 100644
--- a/tcg/tcg-op-vec.c
+++ b/tcg/tcg-op-vec.c
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "tcg.h"
 #include "tcg-op.h"
 #include "tcg-mo.h"
diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh
index af6c610479..039406bf28 100755
--- a/target/xtensa/import_core.sh
+++ b/target/xtensa/import_core.sh
@@ -39,7 +39,6 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \
 cat <<EOF > "${TARGET}.c"
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/gdbstub.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 10/21] hw: Do not include "exec/ioport.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (8 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29  7:59   ` Marcel Apfelbaum
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 11/21] hw: Do not include "exec/address-spaces.h" " Philippe Mathieu-Daudé
                   ` (11 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Igor Mammedov,
	Marcel Apfelbaum

Code change produced with:
    $ git grep '#include "exec/ioport.h"' hw | \
      cut -d: -f-1 | \
      xargs egrep -Li "(portio|cpu_(in|out).\()" | \
      xargs sed -i.bak '/#include "exec\/ioport.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/acpi/pcihp.c | 1 -
 hw/acpi/piix4.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 91c82fdc7a..80d42e12ff 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -32,7 +32,6 @@
 #include "hw/pci/pci.h"
 #include "hw/acpi/acpi.h"
 #include "sysemu/sysemu.h"
-#include "exec/ioport.h"
 #include "exec/address-spaces.h"
 #include "hw/pci/pci_bus.h"
 #include "qapi/error.h"
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 8b703455b7..6404af5f33 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -28,7 +28,6 @@
 #include "sysemu/sysemu.h"
 #include "qapi/error.h"
 #include "qemu/range.h"
-#include "exec/ioport.h"
 #include "hw/nvram/fw_cfg.h"
 #include "exec/address-spaces.h"
 #include "hw/acpi/piix4.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 11/21] hw: Do not include "exec/address-spaces.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (9 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 10/21] hw: Do not include "exec/ioport.h" " Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Peter Maydell,
	Alistair Francis, Edgar E. Iglesias, Kevin Wolf, Max Reitz,
	Thomas Huth, Paul Burton, Jason Wang, Michael Clark,
	Palmer Dabbelt, Sagar Karandikar, Bastian Koppelmann,
	Aurelien Jarno, Magnus Damm, Beniamino Galvani, open list:ARM,
	open list:Block layer core

Code change produced with:
    $ git grep '#include "exec/address-spaces.h"' hw include/hw | \
      cut -d: -f-1 | \
      xargs egrep -L "(get_system_|address_space_)" | \
      xargs sed -i.bak '/#include "exec\/address-spaces.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/hw/arm/allwinner-a10.h       | 1 -
 include/hw/arm/bcm2835_peripherals.h | 1 -
 include/hw/display/bcm2835_fb.h      | 1 -
 include/hw/dma/bcm2835_dma.h         | 1 -
 include/hw/misc/bcm2835_mbox.h       | 1 -
 include/hw/misc/bcm2835_property.h   | 1 -
 include/hw/sh4/sh_intc.h             | 1 -
 include/hw/virtio/virtio-access.h    | 1 -
 hw/arm/bcm2836.c                     | 1 -
 hw/arm/xlnx-zcu102.c                 | 1 -
 hw/block/onenand.c                   | 1 -
 hw/block/pflash_cfi01.c              | 1 -
 hw/block/pflash_cfi02.c              | 1 -
 hw/char/mcf_uart.c                   | 1 -
 hw/char/serial.c                     | 1 -
 hw/char/sh_serial.c                  | 1 -
 hw/core/loader-fit.c                 | 1 -
 hw/core/platform-bus.c               | 1 -
 hw/display/sm501.c                   | 1 -
 hw/m68k/mcf5206.c                    | 1 -
 hw/m68k/mcf_intc.c                   | 1 -
 hw/misc/arm_integrator_debug.c       | 1 -
 hw/net/mcf_fec.c                     | 1 -
 hw/net/ne2000-isa.c                  | 1 -
 hw/pci-host/versatile.c              | 1 -
 hw/riscv/riscv_htif.c                | 1 -
 hw/sh4/sh7750.c                      | 1 -
 hw/timer/sh_timer.c                  | 1 -
 28 files changed, 28 deletions(-)

diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index 6b32a99e21..efb8fc8123 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -11,7 +11,6 @@
 #include "hw/ide/ahci.h"
 
 #include "sysemu/sysemu.h"
-#include "exec/address-spaces.h"
 
 
 #define AW_A10_PIC_REG_BASE     0x01c20400
diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_peripherals.h
index 122b286de7..f5b193f670 100644
--- a/include/hw/arm/bcm2835_peripherals.h
+++ b/include/hw/arm/bcm2835_peripherals.h
@@ -12,7 +12,6 @@
 #define BCM2835_PERIPHERALS_H
 
 #include "qemu-common.h"
-#include "exec/address-spaces.h"
 #include "hw/sysbus.h"
 #include "hw/char/bcm2835_aux.h"
 #include "hw/display/bcm2835_fb.h"
diff --git a/include/hw/display/bcm2835_fb.h b/include/hw/display/bcm2835_fb.h
index 9a12d7afa2..ae0a3807f2 100644
--- a/include/hw/display/bcm2835_fb.h
+++ b/include/hw/display/bcm2835_fb.h
@@ -12,7 +12,6 @@
 #define BCM2835_FB_H
 
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "ui/console.h"
 
 #define TYPE_BCM2835_FB "bcm2835-fb"
diff --git a/include/hw/dma/bcm2835_dma.h b/include/hw/dma/bcm2835_dma.h
index 75312e2e17..60138f4d31 100644
--- a/include/hw/dma/bcm2835_dma.h
+++ b/include/hw/dma/bcm2835_dma.h
@@ -7,7 +7,6 @@
 #define BCM2835_DMA_H
 
 #include "qemu-common.h"
-#include "exec/address-spaces.h"
 #include "hw/sysbus.h"
 
 typedef struct {
diff --git a/include/hw/misc/bcm2835_mbox.h b/include/hw/misc/bcm2835_mbox.h
index f4e9ff9ef6..7e8f3ce86d 100644
--- a/include/hw/misc/bcm2835_mbox.h
+++ b/include/hw/misc/bcm2835_mbox.h
@@ -8,7 +8,6 @@
 
 #include "bcm2835_mbox_defs.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 
 #define TYPE_BCM2835_MBOX "bcm2835-mbox"
 #define BCM2835_MBOX(obj) \
diff --git a/include/hw/misc/bcm2835_property.h b/include/hw/misc/bcm2835_property.h
index edcab603ce..11be0dbeac 100644
--- a/include/hw/misc/bcm2835_property.h
+++ b/include/hw/misc/bcm2835_property.h
@@ -7,7 +7,6 @@
 #define BCM2835_PROPERTY_H
 
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "net/net.h"
 #include "hw/display/bcm2835_fb.h"
 
diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h
index 7913bc48a2..fbcee94ed7 100644
--- a/include/hw/sh4/sh_intc.h
+++ b/include/hw/sh4/sh_intc.h
@@ -3,7 +3,6 @@
 
 #include "qemu-common.h"
 #include "hw/irq.h"
-#include "exec/address-spaces.h"
 
 typedef unsigned char intc_enum;
 
diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h
index 2e92074bd1..bdf58f3119 100644
--- a/include/hw/virtio/virtio-access.h
+++ b/include/hw/virtio/virtio-access.h
@@ -18,7 +18,6 @@
 
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-bus.h"
-#include "exec/address-spaces.h"
 
 #if defined(TARGET_PPC64) || defined(TARGET_ARM)
 #define LEGACY_VIRTIO_IS_BIENDIAN 1
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index 3c4b44a53e..6805a7d7c8 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -15,7 +15,6 @@
 #include "hw/arm/bcm2836.h"
 #include "hw/arm/raspi_platform.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 
 /* Peripheral base address seen by the CPU */
 #define BCM2836_PERI_BASE       0x3F000000
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index b126cf148b..c70278c8c1 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -22,7 +22,6 @@
 #include "hw/arm/xlnx-zynqmp.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
-#include "exec/address-spaces.h"
 #include "qemu/log.h"
 #include "sysemu/qtest.h"
 
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index ed77f859e9..ab0c7ea1b3 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -27,7 +27,6 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "hw/sysbus.h"
 #include "qemu/error-report.h"
 
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 2e8284001d..e4b5b3c273 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -43,7 +43,6 @@
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
-#include "exec/address-spaces.h"
 #include "qemu/host-utils.h"
 #include "qemu/log.h"
 #include "hw/sysbus.h"
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 75d1ae1026..a8b3f7f978 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -41,7 +41,6 @@
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "sysemu/block-backend.h"
-#include "exec/address-spaces.h"
 #include "qemu/host-utils.h"
 #include "hw/sysbus.h"
 
diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c
index faae083e78..787f985db6 100644
--- a/hw/char/mcf_uart.c
+++ b/hw/char/mcf_uart.c
@@ -10,7 +10,6 @@
 #include "hw/sysbus.h"
 #include "hw/m68k/mcf.h"
 #include "chardev/char-fe.h"
-#include "exec/address-spaces.h"
 
 typedef struct {
     SysBusDevice parent_obj;
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 2c080c9862..605b0d02f9 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -28,7 +28,6 @@
 #include "chardev/char-serial.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 
 //#define DEBUG_SERIAL
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 835b5378a0..373a40595f 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
@@ -28,7 +28,6 @@
 #include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "chardev/char-fe.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 
 //#define DEBUG_SERIAL
diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c
index 0c4a7207f4..6387854b54 100644
--- a/hw/core/loader-fit.c
+++ b/hw/core/loader-fit.c
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "exec/address-spaces.h"
 #include "exec/memory.h"
 #include "hw/loader.h"
 #include "hw/loader-fit.h"
diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c
index 807cb5ccda..e473a44746 100644
--- a/hw/core/platform-bus.c
+++ b/hw/core/platform-bus.c
@@ -21,7 +21,6 @@
 
 #include "qemu/osdep.h"
 #include "hw/platform-bus.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index f4bb33c279..e47be99451 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -36,7 +36,6 @@
 #include "hw/pci/pci.h"
 #include "qemu/range.h"
 #include "ui/pixel_ops.h"
-#include "exec/address-spaces.h"
 
 /*
  * Status: 2010/05/07
diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c
index 6ad1e4bd2d..7abd84ac47 100644
--- a/hw/m68k/mcf5206.c
+++ b/hw/m68k/mcf5206.c
@@ -14,7 +14,6 @@
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "sysemu/sysemu.h"
-#include "exec/address-spaces.h"
 
 /* General purpose timer module.  */
 typedef struct {
diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c
index 8198afac1e..393ce284a2 100644
--- a/hw/m68k/mcf_intc.c
+++ b/hw/m68k/mcf_intc.c
@@ -11,7 +11,6 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/m68k/mcf.h"
-#include "exec/address-spaces.h"
 
 #define TYPE_MCF_INTC "mcf-intc"
 #define MCF_INTC(obj) OBJECT_CHECK(mcf_intc_state, (obj), TYPE_MCF_INTC)
diff --git a/hw/misc/arm_integrator_debug.c b/hw/misc/arm_integrator_debug.c
index 8a5f29559d..533e6e3208 100644
--- a/hw/misc/arm_integrator_debug.c
+++ b/hw/misc/arm_integrator_debug.c
@@ -17,7 +17,6 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "hw/misc/arm_integrator_debug.h"
 #include "qemu/log.h"
 
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index bfa6b4bcce..0091e4ecdd 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -14,7 +14,6 @@
 #include "hw/sysbus.h"
 /* For crc32 */
 #include <zlib.h>
-#include "exec/address-spaces.h"
 
 //#define DEBUG_FEC 1
 
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c
index 70e5c1d3d4..c7fdeb0f6c 100644
--- a/hw/net/ne2000-isa.c
+++ b/hw/net/ne2000-isa.c
@@ -27,7 +27,6 @@
 #include "hw/qdev.h"
 #include "ne2000.h"
 #include "sysemu/sysemu.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
index d0b02bdc47..7b19078c80 100644
--- a/hw/pci-host/versatile.c
+++ b/hw/pci-host/versatile.c
@@ -12,7 +12,6 @@
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pci_host.h"
-#include "exec/address-spaces.h"
 #include "qemu/log.h"
 
 /* Old and buggy versions of QEMU used the wrong mapping from
diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c
index f73512941f..4f7b11dc37 100644
--- a/hw/riscv/riscv_htif.c
+++ b/hw/riscv/riscv_htif.c
@@ -29,7 +29,6 @@
 #include "chardev/char-fe.h"
 #include "hw/riscv/riscv_htif.h"
 #include "qemu/timer.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 
 #define RISCV_DEBUG_HTIF 0
diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c
index 5a7d47d31e..2dc07a904b 100644
--- a/hw/sh4/sh7750.c
+++ b/hw/sh4/sh7750.c
@@ -31,7 +31,6 @@
 #include "hw/sh4/sh_intc.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
-#include "exec/address-spaces.h"
 
 #define NB_DEVICES 4
 
diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c
index 9afb2d048c..5f8736cf10 100644
--- a/hw/timer/sh_timer.c
+++ b/hw/timer/sh_timer.c
@@ -13,7 +13,6 @@
 #include "hw/sh4/sh.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
-#include "exec/address-spaces.h"
 #include "hw/ptimer.h"
 
 //#define DEBUG_TIMER
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 12/21] hw: Do not include "sysemu/block-backend.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
@ 2018-05-28 23:27   ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary Philippe Mathieu-Daudé
                     ` (20 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Peter Maydell,
	Andrzej Zaborowski, Edgar E. Iglesias, Alistair Francis,
	Stefan Hajnoczi, Kevin Wolf, Max Reitz, John Snow, Michael Walle,
	Aurelien Jarno, Yongbok Kim, David Gibson, Alexander Graf,
	Cornelia Huck, Christian Borntraeger, Richard Henderson,
	David Hildenbrand, Fam Zheng, Magnus Damm, Stefano Stabellini,
	Anthony Perard, Max Filippov, open list:ARM,
	open list:virtio-blk, open list:sPAPR, open list:virtio-ccw,
	open list:X86

Remove those unneeded includes to speed up the compilation
process a little bit. (Continue 7eceff5b5a1fa cleanup)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/arm/collie.c                          | 1 -
 hw/arm/gumstix.c                         | 1 -
 hw/arm/mainstone.c                       | 1 -
 hw/arm/nseries.c                         | 1 -
 hw/arm/omap1.c                           | 1 -
 hw/arm/omap2.c                           | 1 -
 hw/arm/omap_sx1.c                        | 1 -
 hw/arm/pxa2xx.c                          | 1 -
 hw/arm/spitz.c                           | 1 -
 hw/arm/versatilepb.c                     | 1 -
 hw/arm/vexpress.c                        | 1 -
 hw/arm/virt.c                            | 1 -
 hw/arm/xilinx_zynq.c                     | 1 -
 hw/arm/z2.c                              | 1 -
 hw/block/dataplane/virtio-blk.c          | 1 -
 hw/block/virtio-blk.c                    | 1 -
 hw/core/qdev-properties.c                | 1 -
 hw/cris/axis_dev88.c                     | 1 -
 hw/display/tc6393xb.c                    | 1 -
 hw/ide/pci.c                             | 1 -
 hw/ide/via.c                             | 1 -
 hw/isa/isa-superio.c                     | 1 -
 hw/lm32/lm32_boards.c                    | 1 -
 hw/lm32/milkymist.c                      | 1 -
 hw/microblaze/petalogix_ml605_mmu.c      | 1 -
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
 hw/mips/mips_r4k.c                       | 1 -
 hw/ppc/spapr.c                           | 1 -
 hw/ppc/virtex_ml507.c                    | 2 --
 hw/s390x/virtio-ccw.c                    | 1 -
 hw/scsi/mptsas.c                         | 1 -
 hw/sd/pl181.c                            | 1 -
 hw/sd/sdhci.c                            | 1 -
 hw/sd/ssi-sd.c                           | 1 -
 hw/sh4/r2d.c                             | 1 -
 hw/virtio/virtio-pci.c                   | 1 -
 hw/xen/xen_devconfig.c                   | 1 -
 hw/xtensa/xtfpga.c                       | 1 -
 38 files changed, 39 deletions(-)

diff --git a/hw/arm/collie.c b/hw/arm/collie.c
index f8c566e2e5..48b732c176 100644
--- a/hw/arm/collie.c
+++ b/hw/arm/collie.c
@@ -16,7 +16,6 @@
 #include "strongarm.h"
 #include "hw/arm/arm.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
 
diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c
index ea2a3c532d..56cb763c4e 100644
--- a/hw/arm/gumstix.c
+++ b/hw/arm/gumstix.c
@@ -42,7 +42,6 @@
 #include "hw/block/flash.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "cpu.h"
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 4215c025fc..0beb5c426b 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -21,7 +21,6 @@
 #include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 32687afced..906b7ca22d 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -35,7 +35,6 @@
 #include "hw/hw.h"
 #include "hw/bt.h"
 #include "hw/loader.h"
-#include "sysemu/block-backend.h"
 #include "hw/sysbus.h"
 #include "qemu/log.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index e54c1f8f99..854996c1ac 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -28,7 +28,6 @@
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
 #include "hw/arm/soc_dma.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "qemu/range.h"
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index b8d0910a1f..cc4250b7da 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -23,7 +23,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "hw/boards.h"
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index eccc19c77b..84550f0236 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -33,7 +33,6 @@
 #include "hw/boards.h"
 #include "hw/arm/arm.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/qtest.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index a2803fdee4..b67b0cefb6 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -19,7 +19,6 @@
 #include "hw/i2c/i2c.h"
 #include "hw/ssi/ssi.h"
 #include "chardev/char-fe.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "qemu/cutils.h"
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index e419e3c00e..3cc27a1e44 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -27,7 +27,6 @@
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index e01e3192ff..a5a06b6d40 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -19,7 +19,6 @@
 #include "hw/pci/pci.h"
 #include "hw/i2c/i2c.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "hw/block/flash.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index f1e33c8a36..5bfe2e4348 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -35,7 +35,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
-#include "sysemu/block-backend.h"
 #include "hw/block/flash.h"
 #include "sysemu/device_tree.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a3a28e20e8..3aa19b2935 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -38,7 +38,6 @@
 #include "hw/vfio/vfio-amd-xgbe.h"
 #include "hw/devices.h"
 #include "net/net.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/numa.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 899a26326f..f1496d2927 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -26,7 +26,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "hw/loader.h"
 #include "hw/misc/zynq-xadc.h"
 #include "hw/ssi/ssi.h"
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index 730a5392e9..697a822f1e 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -21,7 +21,6 @@
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "ui/console.h"
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 101f32cf66..d648aeb73b 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -19,7 +19,6 @@
 #include "qemu/thread.h"
 #include "qemu/error-report.h"
 #include "hw/virtio/virtio-access.h"
-#include "sysemu/block-backend.h"
 #include "hw/virtio/virtio-blk.h"
 #include "virtio-blk.h"
 #include "block/aio.h"
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b1532e4e91..50b5c869e3 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -18,7 +18,6 @@
 #include "qemu/error-report.h"
 #include "trace.h"
 #include "hw/block/block.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/virtio/virtio-blk.h"
 #include "dataplane/virtio-blk.h"
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 5bbc2d98b5..989778ab7f 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -5,7 +5,6 @@
 #include "hw/pci/pci.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
-#include "sysemu/block-backend.h"
 #include "hw/block/block.h"
 #include "net/hub.h"
 #include "qapi/visitor.h"
diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c
index 409f3d581a..56ee398ee5 100644
--- a/hw/cris/axis_dev88.c
+++ b/hw/cris/axis_dev88.c
@@ -34,7 +34,6 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "boot.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c
index 464465b7c2..8392e59493 100644
--- a/hw/display/tc6393xb.c
+++ b/hw/display/tc6393xb.c
@@ -18,7 +18,6 @@
 #include "hw/block/flash.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 
 #define IRQ_TC6393_NAND		0
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 1ab0a892d0..fe1ceeb0cd 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -26,7 +26,6 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/dma.h"
 #include "qemu/error-report.h"
 #include "hw/ide/pci.h"
diff --git a/hw/ide/via.c b/hw/ide/via.c
index 117ac4d95e..238f038d72 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -27,7 +27,6 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/dma.h"
 
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index 76286c81a1..9359be7008 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -13,7 +13,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "chardev/char.h"
 #include "hw/isa/superio.h"
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index 907e875d02..167058348e 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -27,7 +27,6 @@
 #include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
-#include "sysemu/block-backend.h"
 #include "elf.h"
 #include "lm32_hwsetup.h"
 #include "lm32.h"
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index f9688e059e..c36bbc4ae2 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -30,7 +30,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "sysemu/block-backend.h"
 #include "milkymist-hw.h"
 #include "lm32.h"
 #include "exec/address-spaces.h"
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index cf6bf3f32a..6c4a544eac 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -36,7 +36,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "hw/char/serial.h"
 #include "exec/address-spaces.h"
 #include "hw/ssi/ssi.h"
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 1186002a76..0da3e62102 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -34,7 +34,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "hw/char/xilinx_uartlite.h"
 
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index e04b49d3c5..e5cf8ed1a3 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -30,7 +30,6 @@
 #include "hw/timer/mc146818rtc.h"
 #include "hw/input/i8042.h"
 #include "hw/timer/i8254.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "qemu/error-report.h"
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ebf30dd60b..2e910428f3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -35,7 +35,6 @@
 #include "elf.h"
 #include "net/net.h"
 #include "sysemu/device_tree.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/cpus.h"
 #include "sysemu/hw_accel.h"
 #include "kvm_ppc.h"
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index a80cbdd7ee..b4bb90d50b 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -44,8 +44,6 @@
 #include "hw/ppc/ppc4xx.h"
 #include "ppc405.h"
 
-#include "sysemu/block-backend.h"
-
 #define EPAPR_MAGIC    (0x45504150)
 #define FLASH_SIZE     (16 * 1024 * 1024)
 
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 22df33b509..b68798ac52 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index 3f061f3f68..4176e871e1 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -26,7 +26,6 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
-#include "sysemu/block-backend.h"
 #include "hw/pci/msi.h"
 #include "qemu/iov.h"
 #include "hw/scsi/scsi.h"
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 3ba1f7dd23..1cc94dbfdf 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/sysbus.h"
 #include "hw/sd/sd.h"
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 63c44a4ee8..b65403947b 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -26,7 +26,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/dma.h"
 #include "qemu/timer.h"
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index ae04b6641b..96542ecd62 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/ssi/ssi.h"
 #include "hw/sd/sd.h"
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 6b01d6eed8..8fe8766eb9 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -40,7 +40,6 @@
 #include "hw/loader.h"
 #include "hw/usb.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 
 #define FLASH_BASE 0x00000000
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 5eb0c323ca..3a01fe90f0 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -32,7 +32,6 @@
 #include "hw/pci/msix.h"
 #include "hw/loader.h"
 #include "sysemu/kvm.h"
-#include "sysemu/block-backend.h"
 #include "virtio-pci.h"
 #include "qemu/range.h"
 #include "hw/virtio/virtio-bus.h"
diff --git a/hw/xen/xen_devconfig.c b/hw/xen/xen_devconfig.c
index fac9d3fcdc..aebc19bd71 100644
--- a/hw/xen/xen_devconfig.c
+++ b/hw/xen/xen_devconfig.c
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "hw/xen/xen_backend.h"
 #include "qemu/option.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 
 /* ------------------------------------------------------------- */
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 63734c70ec..5dc13034f9 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -38,7 +38,6 @@
 #include "net/net.h"
 #include "hw/sysbus.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "chardev/char.h"
 #include "sysemu/device_tree.h"
 #include "qemu/error-report.h"
-- 
2.17.0

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

* [PATCH v4 12/21] hw: Do not include "sysemu/block-backend.h" if it is not necessary
@ 2018-05-28 23:27   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Peter Maydell, David Hildenbrand, qemu-devel, Max Filippov,
	Edgar E. Iglesias, Yongbok Kim, Stefano Stabellini,
	open list:virtio-blk, qemu-trivial, Magnus Damm, Alexander Graf,
	Christian Borntraeger, Anthony Perard, open list:X86,
	David Gibson, Andrzej Zaborowski, Fam Zheng, Alistair Francis,
	open list:virtio-ccw, open list:ARM, Stefan Hajnoczi, John Snow,
	Richard

Remove those unneeded includes to speed up the compilation
process a little bit. (Continue 7eceff5b5a1fa cleanup)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/arm/collie.c                          | 1 -
 hw/arm/gumstix.c                         | 1 -
 hw/arm/mainstone.c                       | 1 -
 hw/arm/nseries.c                         | 1 -
 hw/arm/omap1.c                           | 1 -
 hw/arm/omap2.c                           | 1 -
 hw/arm/omap_sx1.c                        | 1 -
 hw/arm/pxa2xx.c                          | 1 -
 hw/arm/spitz.c                           | 1 -
 hw/arm/versatilepb.c                     | 1 -
 hw/arm/vexpress.c                        | 1 -
 hw/arm/virt.c                            | 1 -
 hw/arm/xilinx_zynq.c                     | 1 -
 hw/arm/z2.c                              | 1 -
 hw/block/dataplane/virtio-blk.c          | 1 -
 hw/block/virtio-blk.c                    | 1 -
 hw/core/qdev-properties.c                | 1 -
 hw/cris/axis_dev88.c                     | 1 -
 hw/display/tc6393xb.c                    | 1 -
 hw/ide/pci.c                             | 1 -
 hw/ide/via.c                             | 1 -
 hw/isa/isa-superio.c                     | 1 -
 hw/lm32/lm32_boards.c                    | 1 -
 hw/lm32/milkymist.c                      | 1 -
 hw/microblaze/petalogix_ml605_mmu.c      | 1 -
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
 hw/mips/mips_r4k.c                       | 1 -
 hw/ppc/spapr.c                           | 1 -
 hw/ppc/virtex_ml507.c                    | 2 --
 hw/s390x/virtio-ccw.c                    | 1 -
 hw/scsi/mptsas.c                         | 1 -
 hw/sd/pl181.c                            | 1 -
 hw/sd/sdhci.c                            | 1 -
 hw/sd/ssi-sd.c                           | 1 -
 hw/sh4/r2d.c                             | 1 -
 hw/virtio/virtio-pci.c                   | 1 -
 hw/xen/xen_devconfig.c                   | 1 -
 hw/xtensa/xtfpga.c                       | 1 -
 38 files changed, 39 deletions(-)

diff --git a/hw/arm/collie.c b/hw/arm/collie.c
index f8c566e2e5..48b732c176 100644
--- a/hw/arm/collie.c
+++ b/hw/arm/collie.c
@@ -16,7 +16,6 @@
 #include "strongarm.h"
 #include "hw/arm/arm.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
 
diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c
index ea2a3c532d..56cb763c4e 100644
--- a/hw/arm/gumstix.c
+++ b/hw/arm/gumstix.c
@@ -42,7 +42,6 @@
 #include "hw/block/flash.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "cpu.h"
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 4215c025fc..0beb5c426b 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -21,7 +21,6 @@
 #include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 32687afced..906b7ca22d 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -35,7 +35,6 @@
 #include "hw/hw.h"
 #include "hw/bt.h"
 #include "hw/loader.h"
-#include "sysemu/block-backend.h"
 #include "hw/sysbus.h"
 #include "qemu/log.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index e54c1f8f99..854996c1ac 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -28,7 +28,6 @@
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
 #include "hw/arm/soc_dma.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "qemu/range.h"
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index b8d0910a1f..cc4250b7da 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -23,7 +23,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "hw/boards.h"
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index eccc19c77b..84550f0236 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -33,7 +33,6 @@
 #include "hw/boards.h"
 #include "hw/arm/arm.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/qtest.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index a2803fdee4..b67b0cefb6 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -19,7 +19,6 @@
 #include "hw/i2c/i2c.h"
 #include "hw/ssi/ssi.h"
 #include "chardev/char-fe.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "qemu/cutils.h"
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index e419e3c00e..3cc27a1e44 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -27,7 +27,6 @@
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index e01e3192ff..a5a06b6d40 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -19,7 +19,6 @@
 #include "hw/pci/pci.h"
 #include "hw/i2c/i2c.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "hw/block/flash.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index f1e33c8a36..5bfe2e4348 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -35,7 +35,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
-#include "sysemu/block-backend.h"
 #include "hw/block/flash.h"
 #include "sysemu/device_tree.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a3a28e20e8..3aa19b2935 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -38,7 +38,6 @@
 #include "hw/vfio/vfio-amd-xgbe.h"
 #include "hw/devices.h"
 #include "net/net.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/numa.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 899a26326f..f1496d2927 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -26,7 +26,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "hw/loader.h"
 #include "hw/misc/zynq-xadc.h"
 #include "hw/ssi/ssi.h"
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index 730a5392e9..697a822f1e 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -21,7 +21,6 @@
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "ui/console.h"
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 101f32cf66..d648aeb73b 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -19,7 +19,6 @@
 #include "qemu/thread.h"
 #include "qemu/error-report.h"
 #include "hw/virtio/virtio-access.h"
-#include "sysemu/block-backend.h"
 #include "hw/virtio/virtio-blk.h"
 #include "virtio-blk.h"
 #include "block/aio.h"
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b1532e4e91..50b5c869e3 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -18,7 +18,6 @@
 #include "qemu/error-report.h"
 #include "trace.h"
 #include "hw/block/block.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/virtio/virtio-blk.h"
 #include "dataplane/virtio-blk.h"
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 5bbc2d98b5..989778ab7f 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -5,7 +5,6 @@
 #include "hw/pci/pci.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
-#include "sysemu/block-backend.h"
 #include "hw/block/block.h"
 #include "net/hub.h"
 #include "qapi/visitor.h"
diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c
index 409f3d581a..56ee398ee5 100644
--- a/hw/cris/axis_dev88.c
+++ b/hw/cris/axis_dev88.c
@@ -34,7 +34,6 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "boot.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c
index 464465b7c2..8392e59493 100644
--- a/hw/display/tc6393xb.c
+++ b/hw/display/tc6393xb.c
@@ -18,7 +18,6 @@
 #include "hw/block/flash.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 
 #define IRQ_TC6393_NAND		0
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 1ab0a892d0..fe1ceeb0cd 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -26,7 +26,6 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/dma.h"
 #include "qemu/error-report.h"
 #include "hw/ide/pci.h"
diff --git a/hw/ide/via.c b/hw/ide/via.c
index 117ac4d95e..238f038d72 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -27,7 +27,6 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/dma.h"
 
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index 76286c81a1..9359be7008 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -13,7 +13,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "sysemu/sysemu.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "chardev/char.h"
 #include "hw/isa/superio.h"
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index 907e875d02..167058348e 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -27,7 +27,6 @@
 #include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
-#include "sysemu/block-backend.h"
 #include "elf.h"
 #include "lm32_hwsetup.h"
 #include "lm32.h"
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index f9688e059e..c36bbc4ae2 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -30,7 +30,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "sysemu/block-backend.h"
 #include "milkymist-hw.h"
 #include "lm32.h"
 #include "exec/address-spaces.h"
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index cf6bf3f32a..6c4a544eac 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -36,7 +36,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "hw/char/serial.h"
 #include "exec/address-spaces.h"
 #include "hw/ssi/ssi.h"
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 1186002a76..0da3e62102 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -34,7 +34,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "hw/char/xilinx_uartlite.h"
 
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index e04b49d3c5..e5cf8ed1a3 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -30,7 +30,6 @@
 #include "hw/timer/mc146818rtc.h"
 #include "hw/input/i8042.h"
 #include "hw/timer/i8254.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "qemu/error-report.h"
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ebf30dd60b..2e910428f3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -35,7 +35,6 @@
 #include "elf.h"
 #include "net/net.h"
 #include "sysemu/device_tree.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/cpus.h"
 #include "sysemu/hw_accel.h"
 #include "kvm_ppc.h"
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index a80cbdd7ee..b4bb90d50b 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -44,8 +44,6 @@
 #include "hw/ppc/ppc4xx.h"
 #include "ppc405.h"
 
-#include "sysemu/block-backend.h"
-
 #define EPAPR_MAGIC    (0x45504150)
 #define FLASH_SIZE     (16 * 1024 * 1024)
 
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 22df33b509..b68798ac52 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index 3f061f3f68..4176e871e1 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -26,7 +26,6 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
-#include "sysemu/block-backend.h"
 #include "hw/pci/msi.h"
 #include "qemu/iov.h"
 #include "hw/scsi/scsi.h"
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 3ba1f7dd23..1cc94dbfdf 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/sysbus.h"
 #include "hw/sd/sd.h"
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 63c44a4ee8..b65403947b 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -26,7 +26,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/dma.h"
 #include "qemu/timer.h"
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index ae04b6641b..96542ecd62 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/ssi/ssi.h"
 #include "hw/sd/sd.h"
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 6b01d6eed8..8fe8766eb9 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -40,7 +40,6 @@
 #include "hw/loader.h"
 #include "hw/usb.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
 
 #define FLASH_BASE 0x00000000
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 5eb0c323ca..3a01fe90f0 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -32,7 +32,6 @@
 #include "hw/pci/msix.h"
 #include "hw/loader.h"
 #include "sysemu/kvm.h"
-#include "sysemu/block-backend.h"
 #include "virtio-pci.h"
 #include "qemu/range.h"
 #include "hw/virtio/virtio-bus.h"
diff --git a/hw/xen/xen_devconfig.c b/hw/xen/xen_devconfig.c
index fac9d3fcdc..aebc19bd71 100644
--- a/hw/xen/xen_devconfig.c
+++ b/hw/xen/xen_devconfig.c
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "hw/xen/xen_backend.h"
 #include "qemu/option.h"
-#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 
 /* ------------------------------------------------------------- */
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 63734c70ec..5dc13034f9 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -38,7 +38,6 @@
 #include "net/net.h"
 #include "hw/sysbus.h"
 #include "hw/block/flash.h"
-#include "sysemu/block-backend.h"
 #include "chardev/char.h"
 #include "sysemu/device_tree.h"
 #include "qemu/error-report.h"
-- 
2.17.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Qemu-devel] [PATCH v4 13/21] hw: Do not include "sysemu/blockdev.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (11 preceding siblings ...)
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Peter Maydell,
	Aurelien Jarno, Yongbok Kim, Alexander Graf, David Gibson,
	open list:ARM, open list:ppc4xx

The header "hw/boards.h" already includes "sysemu/blockdev.h".

Code change produced with:

    $ git grep '#include "sysemu/blockdev.h"' hw | \
      cut -d: -f-1 | \
      xargs fgrep -l '#include "hw/boards.h"' | \
      xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/arm/aspeed.c        | 1 -
 hw/arm/omap1.c         | 1 -
 hw/arm/omap2.c         | 1 -
 hw/mips/mips_malta.c   | 1 -
 hw/ppc/ppc405_boards.c | 1 -
 hw/ppc/sam460ex.c      | 1 -
 6 files changed, 6 deletions(-)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index aecb3c1e75..a7110a712f 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -19,7 +19,6 @@
 #include "hw/boards.h"
 #include "qemu/log.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "hw/loader.h"
 #include "qemu/error-report.h"
 
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index 854996c1ac..9af04728e3 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -28,7 +28,6 @@
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
 #include "hw/arm/soc_dma.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "qemu/range.h"
 #include "hw/sysbus.h"
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index cc4250b7da..3c7d1364a9 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -23,7 +23,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/qtest.h"
 #include "hw/boards.h"
 #include "hw/hw.h"
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index af70ecffc0..494f84e290 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -46,7 +46,6 @@
 #include "elf.h"
 #include "hw/timer/mc146818rtc.h"
 #include "hw/timer/i8254.h"
-#include "sysemu/blockdev.h"
 #include "exec/address-spaces.h"
 #include "hw/sysbus.h"             /* SysBusDevice */
 #include "qemu/host-utils.h"
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 0b658931ee..d301067d3b 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -37,7 +37,6 @@
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "hw/loader.h"
-#include "sysemu/blockdev.h"
 #include "exec/address-spaces.h"
 
 #define BIOS_FILENAME "ppc405_rom.bin"
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index a48e6e6fce..3dd23de71f 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -17,7 +17,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/blockdev.h"
 #include "hw/boards.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 14/21] hw: Do not include "sysemu/blockdev.h" if it is not necessary
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
@ 2018-05-28 23:27   ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary Philippe Mathieu-Daudé
                     ` (20 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Peter Crosthwaite,
	Alistair Francis, Kevin Wolf, Max Reitz, Stefano Stabellini,
	Anthony Perard, Marcel Apfelbaum, Richard Henderson,
	Eduardo Habkost, Cornelia Huck, Christian Borntraeger,
	Alexander Graf, David Hildenbrand, Fam Zheng, Gerd Hoffmann,
	Dr. David Alan Gilbert, Markus Armbruster,
	open list:Block layer core, open list:X86, open list:virtio-ccw

Remove those unneeded includes to speed up the compilation
process a little bit.

Code change produced with:

    $ git grep '#include "sysemu/blockdev.h"' | \
      cut -d: -f-1 | \
      xargs egrep -L "(BlockInterfaceType|DriveInfo|drive_get|blk_legacy_dinfo|blockdev_mark_auto_del)" | \
      xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/block/m25p80.c          | 1 -
 hw/block/onenand.c         | 1 -
 hw/i386/xen/xen-mapcache.c | 1 -
 hw/s390x/virtio-ccw.c      | 1 -
 hw/scsi/scsi-generic.c     | 1 -
 hw/sd/sdhci.c              | 1 -
 hw/usb/dev-storage.c       | 1 -
 monitor.c                  | 1 -
 8 files changed, 8 deletions(-)

diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index b49c8e9caa..a5ccffb4aa 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -24,7 +24,6 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "hw/ssi/ssi.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index ab0c7ea1b3..0cb8d7fa13 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -25,7 +25,6 @@
 #include "hw/block/flash.h"
 #include "hw/irq.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "exec/memory.h"
 #include "hw/sysbus.h"
 #include "qemu/error-report.h"
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c
index efa35dc6e0..541b7693b3 100644
--- a/hw/i386/xen/xen-mapcache.c
+++ b/hw/i386/xen/xen-mapcache.c
@@ -14,7 +14,6 @@
 #include <sys/resource.h>
 
 #include "hw/xen/xen_backend.h"
-#include "sysemu/blockdev.h"
 #include "qemu/bitmap.h"
 
 #include <xen/hvm/params.h>
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index b68798ac52..0a9bec484b 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
 #include "net/net.h"
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 381f04e339..03bce8ff39 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -17,7 +17,6 @@
 #include "qemu/error-report.h"
 #include "hw/scsi/scsi.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 
 #ifdef __linux__
 
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index b65403947b..3017e5a95a 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -26,7 +26,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/dma.h"
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index b56c75a73a..d02acda945 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -20,7 +20,6 @@
 #include "monitor/monitor.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "qapi/visitor.h"
 #include "qemu/cutils.h"
 
diff --git a/monitor.c b/monitor.c
index 46814af533..d75cb20815 100644
--- a/monitor.c
+++ b/monitor.c
@@ -44,7 +44,6 @@
 #include "qemu/readline.h"
 #include "ui/console.h"
 #include "ui/input.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/block-backend.h"
 #include "audio/audio.h"
 #include "disas/disas.h"
-- 
2.17.0

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

* [PATCH v4 14/21] hw: Do not include "sysemu/blockdev.h" if it is not necessary
@ 2018-05-28 23:27   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: David Hildenbrand, qemu-devel, Markus Armbruster, Gerd Hoffmann,
	Stefano Stabellini, open list:Block layer core, qemu-trivial,
	Alexander Graf, Christian Borntraeger, Marcel Apfelbaum,
	Anthony Perard, open list:X86, Fam Zheng, Eduardo Habkost,
	Alistair Francis, Dr. David Alan Gilbert, open list:virtio-ccw,
	Richard Henderson, Kevin Wolf, Peter Crosthwaite, Cornelia Huck

Remove those unneeded includes to speed up the compilation
process a little bit.

Code change produced with:

    $ git grep '#include "sysemu/blockdev.h"' | \
      cut -d: -f-1 | \
      xargs egrep -L "(BlockInterfaceType|DriveInfo|drive_get|blk_legacy_dinfo|blockdev_mark_auto_del)" | \
      xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/block/m25p80.c          | 1 -
 hw/block/onenand.c         | 1 -
 hw/i386/xen/xen-mapcache.c | 1 -
 hw/s390x/virtio-ccw.c      | 1 -
 hw/scsi/scsi-generic.c     | 1 -
 hw/sd/sdhci.c              | 1 -
 hw/usb/dev-storage.c       | 1 -
 monitor.c                  | 1 -
 8 files changed, 8 deletions(-)

diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index b49c8e9caa..a5ccffb4aa 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -24,7 +24,6 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "hw/ssi/ssi.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index ab0c7ea1b3..0cb8d7fa13 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -25,7 +25,6 @@
 #include "hw/block/flash.h"
 #include "hw/irq.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "exec/memory.h"
 #include "hw/sysbus.h"
 #include "qemu/error-report.h"
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c
index efa35dc6e0..541b7693b3 100644
--- a/hw/i386/xen/xen-mapcache.c
+++ b/hw/i386/xen/xen-mapcache.c
@@ -14,7 +14,6 @@
 #include <sys/resource.h>
 
 #include "hw/xen/xen_backend.h"
-#include "sysemu/blockdev.h"
 #include "qemu/bitmap.h"
 
 #include <xen/hvm/params.h>
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index b68798ac52..0a9bec484b 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
 #include "net/net.h"
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 381f04e339..03bce8ff39 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -17,7 +17,6 @@
 #include "qemu/error-report.h"
 #include "hw/scsi/scsi.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 
 #ifdef __linux__
 
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index b65403947b..3017e5a95a 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -26,7 +26,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/dma.h"
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index b56c75a73a..d02acda945 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -20,7 +20,6 @@
 #include "monitor/monitor.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/blockdev.h"
 #include "qapi/visitor.h"
 #include "qemu/cutils.h"
 
diff --git a/monitor.c b/monitor.c
index 46814af533..d75cb20815 100644
--- a/monitor.c
+++ b/monitor.c
@@ -44,7 +44,6 @@
 #include "qemu/readline.h"
 #include "ui/console.h"
 #include "ui/input.h"
-#include "sysemu/blockdev.h"
 #include "sysemu/block-backend.h"
 #include "audio/audio.h"
 #include "disas/disas.h"
-- 
2.17.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Qemu-devel] [PATCH v4 15/21] hw/block/nvme: Include "qemu/cutils.h" directly in the source file
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (13 preceding siblings ...)
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29  0:42   ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 16/21] hw/misc/mips_itu: Cleanup includes Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Keith Busch, Kevin Wolf,
	Max Reitz, open list:nvme

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 hw/block/nvme.h | 1 -
 hw/block/nvme.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/nvme.h b/hw/block/nvme.h
index 8f3981121d..cabcf20c32 100644
--- a/hw/block/nvme.h
+++ b/hw/block/nvme.h
@@ -1,6 +1,5 @@
 #ifndef HW_NVME_H
 #define HW_NVME_H
-#include "qemu/cutils.h"
 #include "block/nvme.h"
 
 typedef struct NvmeAsyncEvent {
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 85d2406400..811084b6a7 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -35,6 +35,7 @@
 #include "sysemu/block-backend.h"
 
 #include "qemu/log.h"
+#include "qemu/cutils.h"
 #include "trace.h"
 #include "nvme.h"
 
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 16/21] hw/misc/mips_itu: Cleanup includes
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (14 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 15/21] hw/block/nvme: Include "qemu/cutils.h" directly in the source file Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 17/21] hw/misc/sga: Use the correct ISA include Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Aurelien Jarno,
	Yongbok Kim

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/hw/misc/mips_itu.h | 2 ++
 hw/misc/mips_itu.c         | 5 +----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h
index b3a4532036..030eb4ac62 100644
--- a/include/hw/misc/mips_itu.h
+++ b/include/hw/misc/mips_itu.h
@@ -20,6 +20,8 @@
 #ifndef MIPS_ITU_H
 #define MIPS_ITU_H
 
+#include "hw/sysbus.h"
+
 #define TYPE_MIPS_ITU "mips-itu"
 #define MIPS_ITU(obj) OBJECT_CHECK(MIPSITUState, (obj), TYPE_MIPS_ITU)
 
diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
index c84a48bbb7..ccc4c7d98a 100644
--- a/hw/misc/mips_itu.c
+++ b/hw/misc/mips_itu.c
@@ -18,13 +18,10 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "qemu/log.h"
 #include "exec/exec-all.h"
-#include "hw/hw.h"
-#include "hw/sysbus.h"
-#include "sysemu/sysemu.h"
 #include "hw/misc/mips_itu.h"
 
 #define ITC_TAG_ADDRSPACE_SZ (ITC_ADDRESSMAP_NUM * 8)
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 17/21] hw/misc/sga: Use the correct ISA include
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (15 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 16/21] hw/misc/mips_itu: Cleanup includes Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29  7:58   ` Marcel Apfelbaum
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 18/21] hw/hppa: Remove unused include Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Marcel Apfelbaum

The SGA BIOS loader is an ISA device, it does not require the PCI header.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/misc/sga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/sga.c b/hw/misc/sga.c
index 97fd63f176..4a22a52a60 100644
--- a/hw/misc/sga.c
+++ b/hw/misc/sga.c
@@ -25,7 +25,7 @@
  *
  */
 #include "qemu/osdep.h"
-#include "hw/pci/pci.h"
+#include "hw/isa/isa.h"
 #include "hw/loader.h"
 #include "sysemu/sysemu.h"
 
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 18/21] hw/hppa: Remove unused include
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (16 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 17/21] hw/misc/sga: Use the correct ISA include Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29 11:27   ` Thomas Huth
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 19/21] hw/i386/pc: " Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/hppa/hppa_sys.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h
index a182d1f34e..3f6c145120 100644
--- a/hw/hppa/hppa_sys.h
+++ b/hw/hppa/hppa_sys.h
@@ -3,7 +3,6 @@
 #ifndef HW_HPPA_SYS_H
 #define HW_HPPA_SYS_H
 
-#include "target/hppa/cpu-qom.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
 #include "hw/ide.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 19/21] hw/i386/pc: Remove unused include
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (17 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 18/21] hw/hppa: Remove unused include Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29  7:58   ` Marcel Apfelbaum
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 20/21] hw/ide: " Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  21 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Marcel Apfelbaum

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/i386/pc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index d768930d02..8b0803cb83 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -64,7 +64,6 @@
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/cpu_hotplug.h"
 #include "hw/boards.h"
-#include "hw/pci/pci_host.h"
 #include "acpi-build.h"
 #include "hw/mem/pc-dimm.h"
 #include "qapi/error.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 20/21] hw/ide: Remove unused include
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (18 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 19/21] hw/i386/pc: " Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29 11:35   ` Thomas Huth
  2018-05-30 20:29   ` John Snow
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 21/21] hw: Clean "hw/devices.h" includes Philippe Mathieu-Daudé
  2018-05-29  0:07 ` [Qemu-devel] [PATCH v4 00/21] Includes cleanup Michael S. Tsirkin
  21 siblings, 2 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, qemu-trivial, Paolo Bonzini, John Snow,
	open list:IDE

There is no need to include pci.h in this file.
(Continue f23c81073a cleanup).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/ide/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 866c659498..cc9ca28c33 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "hw/hw.h"
-#include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
-- 
2.17.0

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

* [Qemu-devel] [PATCH v4 21/21] hw: Clean "hw/devices.h" includes
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (19 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 20/21] hw/ide: " Philippe Mathieu-Daudé
@ 2018-05-28 23:27 ` Philippe Mathieu-Daudé
  2018-05-29  0:07 ` [Qemu-devel] [PATCH v4 00/21] Includes cleanup Michael S. Tsirkin
  21 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-28 23:27 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-trivial, Paolo Bonzini

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
This starts the slow process of getting rid of devices.h...
---
 include/hw/devices.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/hw/devices.h b/include/hw/devices.h
index 861ddea8af..0e27feb0c2 100644
--- a/include/hw/devices.h
+++ b/include/hw/devices.h
@@ -1,13 +1,10 @@
 #ifndef QEMU_DEVICES_H
 #define QEMU_DEVICES_H
 
-#include "hw/irq.h"
-
-/* ??? Not all users of this file can include cpu-common.h.  */
-struct MemoryRegion;
-
 /* Devices that have nowhere better to go.  */
 
+#include "hw/hw.h"
+
 /* smc91c111.c */
 void smc91c111_init(NICInfo *, uint32_t, qemu_irq);
 
-- 
2.17.0

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

* Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-28 23:26 ` [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file Philippe Mathieu-Daudé
@ 2018-05-28 23:48   ` Alex Williamson
  2018-05-29  0:06     ` Michael S. Tsirkin
  0 siblings, 1 reply; 52+ messages in thread
From: Alex Williamson @ 2018-05-28 23:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Cornelia Huck, open list:S390

On Mon, 28 May 2018 20:26:59 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

-ENOCOMMITLOG

Why?  Tangible benefit.  Looks like noise.  Thanks,

Alex

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  include/hw/vfio/vfio-common.h | 1 -
>  hw/vfio/ccw.c                 | 1 +
>  hw/vfio/platform.c            | 1 +
>  3 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
> index d9360148e6..8264a65fa5 100644
> --- a/include/hw/vfio/vfio-common.h
> +++ b/include/hw/vfio/vfio-common.h
> @@ -22,7 +22,6 @@
>  #define HW_VFIO_VFIO_COMMON_H
>  
>  #include "qemu-common.h"
> -#include "exec/address-spaces.h"
>  #include "exec/memory.h"
>  #include "qemu/queue.h"
>  #include "qemu/notify.h"
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index e67392c5f9..76e4e8c652 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -22,6 +22,7 @@
>  #include "hw/vfio/vfio-common.h"
>  #include "hw/s390x/s390-ccw.h"
>  #include "hw/s390x/ccw-device.h"
> +#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  
>  #define TYPE_VFIO_CCW "vfio-ccw"
> diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
> index 5c921c27ba..57c4a0ee2b 100644
> --- a/hw/vfio/platform.c
> +++ b/hw/vfio/platform.c
> @@ -24,6 +24,7 @@
>  #include "qemu/range.h"
>  #include "sysemu/sysemu.h"
>  #include "exec/memory.h"
> +#include "exec/address-spaces.h"
>  #include "qemu/queue.h"
>  #include "hw/sysbus.h"
>  #include "trace.h"

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

* Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-28 23:48   ` Alex Williamson
@ 2018-05-29  0:06     ` Michael S. Tsirkin
  2018-05-29  0:36       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 52+ messages in thread
From: Michael S. Tsirkin @ 2018-05-29  0:06 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Philippe Mathieu-Daudé,
	Thomas Huth, qemu-devel, qemu-trivial, Paolo Bonzini,
	Cornelia Huck, open list:S390

On Mon, May 28, 2018 at 05:48:05PM -0600, Alex Williamson wrote:
> On Mon, 28 May 2018 20:26:59 -0300
> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> 
> -ENOCOMMITLOG
> 
> Why?  Tangible benefit.  Looks like noise.  Thanks,
> 
> Alex

I agree it should have a commit log, but .c files
should be self-sufficient not rely on .h files
pulling in headers for symbols the .h does not use
itself.


This is better because it makes refactoring easier.

> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> >  include/hw/vfio/vfio-common.h | 1 -
> >  hw/vfio/ccw.c                 | 1 +
> >  hw/vfio/platform.c            | 1 +
> >  3 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
> > index d9360148e6..8264a65fa5 100644
> > --- a/include/hw/vfio/vfio-common.h
> > +++ b/include/hw/vfio/vfio-common.h
> > @@ -22,7 +22,6 @@
> >  #define HW_VFIO_VFIO_COMMON_H
> >  
> >  #include "qemu-common.h"
> > -#include "exec/address-spaces.h"
> >  #include "exec/memory.h"
> >  #include "qemu/queue.h"
> >  #include "qemu/notify.h"
> > diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> > index e67392c5f9..76e4e8c652 100644
> > --- a/hw/vfio/ccw.c
> > +++ b/hw/vfio/ccw.c
> > @@ -22,6 +22,7 @@
> >  #include "hw/vfio/vfio-common.h"
> >  #include "hw/s390x/s390-ccw.h"
> >  #include "hw/s390x/ccw-device.h"
> > +#include "exec/address-spaces.h"
> >  #include "qemu/error-report.h"
> >  
> >  #define TYPE_VFIO_CCW "vfio-ccw"
> > diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
> > index 5c921c27ba..57c4a0ee2b 100644
> > --- a/hw/vfio/platform.c
> > +++ b/hw/vfio/platform.c
> > @@ -24,6 +24,7 @@
> >  #include "qemu/range.h"
> >  #include "sysemu/sysemu.h"
> >  #include "exec/memory.h"
> > +#include "exec/address-spaces.h"
> >  #include "qemu/queue.h"
> >  #include "hw/sysbus.h"
> >  #include "trace.h"

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

* Re: [Qemu-devel] [PATCH v4 00/21] Includes cleanup
  2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
                   ` (20 preceding siblings ...)
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 21/21] hw: Clean "hw/devices.h" includes Philippe Mathieu-Daudé
@ 2018-05-29  0:07 ` Michael S. Tsirkin
  21 siblings, 0 replies; 52+ messages in thread
From: Michael S. Tsirkin @ 2018-05-29  0:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, qemu-devel, qemu-trivial, Paolo Bonzini

On Mon, May 28, 2018 at 08:26:58PM -0300, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> I split the previous series "Use the BYTE-based definitions when useful",
> this is the first generic part, only headers cleanup, which is big enough.
> 
> Many patches, but "12 insertions(+), 145 deletions(-)" \o/

Series
Acked-by: Michael S. Tsirkin <mst@redhat.com>


> v3 was:
> http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg02049.html
> 
> Philippe Mathieu-Daudé (21):
>   vfio: Include "exec/address-spaces.h" directly in the source file
>   accel: Do not include "exec/address-spaces.h" if it is not necessary
>   target: Do not include "exec/address-spaces.h" if it is not necessary
>   memory: Do not include "exec/ioport.h" if it is not necessary
>   target/i386: Do not include "exec/ioport.h" if it is not necessary
>   target/xtensa: Include "qemu/timer.h" to use NANOSECONDS_PER_SECOND
>   target/ppc: Include "exec/exec-all.h" which provides tlb_flush()
>   target/hppa: Include "qemu/log.h" to use qemu_log()
>   target: Do not include "exec/exec-all.h" if it is not necessary
>   hw: Do not include "exec/ioport.h" if it is not necessary
>   hw: Do not include "exec/address-spaces.h" if it is not necessary
>   hw: Do not include "sysemu/block-backend.h" if it is not necessary
>   hw: Do not include "sysemu/blockdev.h" if it is not necessary
>   hw: Do not include "sysemu/blockdev.h" if it is not necessary
>   hw/block/nvme: Include "qemu/cutils.h" directly in the source file
>   hw/misc/mips_itu: Cleanup includes
>   hw/misc/sga: Use the correct ISA include
>   hw/hppa: Remove unused include
>   hw/i386/pc: Remove unused include
>   hw/ide: Remove unused include
>   hw: Clean "hw/devices.h" includes
> 
>  bsd-user/qemu.h                          | 1 -
>  hw/block/nvme.h                          | 1 -
>  hw/hppa/hppa_sys.h                       | 1 -
>  include/hw/arm/allwinner-a10.h           | 1 -
>  include/hw/arm/bcm2835_peripherals.h     | 1 -
>  include/hw/devices.h                     | 7 ++-----
>  include/hw/display/bcm2835_fb.h          | 1 -
>  include/hw/dma/bcm2835_dma.h             | 1 -
>  include/hw/misc/bcm2835_mbox.h           | 1 -
>  include/hw/misc/bcm2835_property.h       | 1 -
>  include/hw/misc/mips_itu.h               | 2 ++
>  include/hw/sh4/sh_intc.h                 | 1 -
>  include/hw/vfio/vfio-common.h            | 1 -
>  include/hw/virtio/virtio-access.h        | 1 -
>  target/arm/arm_ldst.h                    | 1 -
>  target/ppc/helper_regs.h                 | 1 +
>  accel/tcg/cpu-exec.c                     | 1 -
>  hw/acpi/pcihp.c                          | 1 -
>  hw/acpi/piix4.c                          | 1 -
>  hw/arm/aspeed.c                          | 1 -
>  hw/arm/bcm2836.c                         | 1 -
>  hw/arm/collie.c                          | 1 -
>  hw/arm/gumstix.c                         | 1 -
>  hw/arm/mainstone.c                       | 1 -
>  hw/arm/nseries.c                         | 1 -
>  hw/arm/omap1.c                           | 2 --
>  hw/arm/omap2.c                           | 2 --
>  hw/arm/omap_sx1.c                        | 1 -
>  hw/arm/pxa2xx.c                          | 1 -
>  hw/arm/spitz.c                           | 1 -
>  hw/arm/versatilepb.c                     | 1 -
>  hw/arm/vexpress.c                        | 1 -
>  hw/arm/virt.c                            | 1 -
>  hw/arm/xilinx_zynq.c                     | 1 -
>  hw/arm/xlnx-zcu102.c                     | 1 -
>  hw/arm/z2.c                              | 1 -
>  hw/block/dataplane/virtio-blk.c          | 1 -
>  hw/block/m25p80.c                        | 1 -
>  hw/block/nvme.c                          | 1 +
>  hw/block/onenand.c                       | 2 --
>  hw/block/pflash_cfi01.c                  | 1 -
>  hw/block/pflash_cfi02.c                  | 1 -
>  hw/block/virtio-blk.c                    | 1 -
>  hw/char/mcf_uart.c                       | 1 -
>  hw/char/serial.c                         | 1 -
>  hw/char/sh_serial.c                      | 1 -
>  hw/core/loader-fit.c                     | 1 -
>  hw/core/platform-bus.c                   | 1 -
>  hw/core/qdev-properties.c                | 1 -
>  hw/cris/axis_dev88.c                     | 1 -
>  hw/display/sm501.c                       | 1 -
>  hw/display/tc6393xb.c                    | 1 -
>  hw/i386/kvmvapic.c                       | 1 -
>  hw/i386/pc.c                             | 1 -
>  hw/i386/xen/xen-mapcache.c               | 1 -
>  hw/ide/core.c                            | 1 -
>  hw/ide/pci.c                             | 1 -
>  hw/ide/via.c                             | 1 -
>  hw/isa/isa-superio.c                     | 1 -
>  hw/lm32/lm32_boards.c                    | 1 -
>  hw/lm32/milkymist.c                      | 1 -
>  hw/m68k/mcf5206.c                        | 1 -
>  hw/m68k/mcf_intc.c                       | 1 -
>  hw/microblaze/petalogix_ml605_mmu.c      | 1 -
>  hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
>  hw/mips/mips_malta.c                     | 1 -
>  hw/mips/mips_r4k.c                       | 1 -
>  hw/misc/arm_integrator_debug.c           | 1 -
>  hw/misc/mips_itu.c                       | 5 +----
>  hw/misc/sga.c                            | 2 +-
>  hw/net/mcf_fec.c                         | 1 -
>  hw/net/ne2000-isa.c                      | 1 -
>  hw/pci-host/versatile.c                  | 1 -
>  hw/ppc/ppc405_boards.c                   | 1 -
>  hw/ppc/sam460ex.c                        | 1 -
>  hw/ppc/spapr.c                           | 1 -
>  hw/ppc/virtex_ml507.c                    | 2 --
>  hw/riscv/riscv_htif.c                    | 1 -
>  hw/s390x/virtio-ccw.c                    | 2 --
>  hw/scsi/mptsas.c                         | 1 -
>  hw/scsi/scsi-generic.c                   | 1 -
>  hw/sd/pl181.c                            | 1 -
>  hw/sd/sdhci.c                            | 2 --
>  hw/sd/ssi-sd.c                           | 1 -
>  hw/sh4/r2d.c                             | 1 -
>  hw/sh4/sh7750.c                          | 1 -
>  hw/timer/sh_timer.c                      | 1 -
>  hw/usb/dev-storage.c                     | 1 -
>  hw/vfio/ccw.c                            | 1 +
>  hw/vfio/platform.c                       | 1 +
>  hw/virtio/virtio-pci.c                   | 1 -
>  hw/xen/xen_devconfig.c                   | 1 -
>  hw/xtensa/xtfpga.c                       | 1 -
>  memory.c                                 | 1 -
>  monitor.c                                | 1 -
>  target/arm/arm-powerctl.c                | 1 -
>  target/arm/crypto_helper.c               | 1 -
>  target/arm/iwmmxt_helper.c               | 1 -
>  target/arm/neon_helper.c                 | 1 -
>  target/arm/psci.c                        | 1 -
>  target/arm/vec_helper.c                  | 1 -
>  target/cris/cpu.c                        | 1 -
>  target/hppa/helper.c                     | 1 -
>  target/hppa/int_helper.c                 | 2 +-
>  target/i386/hax-all.c                    | 2 --
>  target/i386/hax-mem.c                    | 1 -
>  target/i386/hax-windows.c                | 1 -
>  target/i386/hvf/hvf.c                    | 2 --
>  target/i386/hvf/x86_task.c               | 3 ---
>  target/i386/kvm.c                        | 1 -
>  target/i386/whpx-all.c                   | 1 -
>  target/lm32/cpu.c                        | 1 -
>  target/m68k/cpu.c                        | 1 -
>  target/moxie/cpu.c                       | 1 -
>  target/moxie/mmu.c                       | 1 -
>  target/openrisc/cpu.c                    | 1 -
>  target/ppc/int_helper.c                  | 1 -
>  target/s390x/cpu.c                       | 1 -
>  target/s390x/diag.c                      | 1 -
>  target/s390x/helper.c                    | 1 -
>  target/s390x/kvm.c                       | 1 -
>  target/s390x/mem_helper.c                | 1 -
>  target/s390x/misc_helper.c               | 1 -
>  target/sparc/mmu_helper.c                | 1 -
>  target/tilegx/cpu.c                      | 1 -
>  target/xtensa/core-dc232b.c              | 2 +-
>  target/xtensa/core-dc233c.c              | 1 -
>  target/xtensa/core-de212.c               | 1 -
>  target/xtensa/core-fsf.c                 | 1 -
>  target/xtensa/core-sample_controller.c   | 1 -
>  target/xtensa/cpu.c                      | 1 -
>  tcg/tcg-op-vec.c                         | 1 -
>  target/xtensa/import_core.sh             | 1 -
>  133 files changed, 12 insertions(+), 145 deletions(-)
> 
> -- 
> 2.17.0

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

* Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-29  0:06     ` Michael S. Tsirkin
@ 2018-05-29  0:36       ` Philippe Mathieu-Daudé
  2018-05-29  9:53         ` Cornelia Huck
  0 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-29  0:36 UTC (permalink / raw)
  To: Michael S. Tsirkin, Alex Williamson
  Cc: Thomas Huth, qemu-devel, qemu-trivial, Paolo Bonzini,
	Cornelia Huck, open list:S390

On 05/28/2018 09:06 PM, Michael S. Tsirkin wrote:
> On Mon, May 28, 2018 at 05:48:05PM -0600, Alex Williamson wrote:
>> On Mon, 28 May 2018 20:26:59 -0300
>> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> -ENOCOMMITLOG

Oops sorry Alex, I meant to add some, but missed this while rebasing.

>> Why?  Tangible benefit.  Looks like noise.  Thanks,
>>
> I agree it should have a commit log, but .c files
> should be self-sufficient not rely on .h files
> pulling in headers for symbols the .h does not use
> itself.

I meant:

  No declaration of "hw/vfio/vfio-common.h" directly requires to include
  the "exec/address-spaces.h" header.  To simplify dependencies and
  ease following cleanup of "exec/address-spaces.h", directly include
  it in the source file where the declaration are used.

> This is better because it makes refactoring easier.
> 
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>>  include/hw/vfio/vfio-common.h | 1 -
>>>  hw/vfio/ccw.c                 | 1 +
>>>  hw/vfio/platform.c            | 1 +
>>>  3 files changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
>>> index d9360148e6..8264a65fa5 100644
>>> --- a/include/hw/vfio/vfio-common.h
>>> +++ b/include/hw/vfio/vfio-common.h
>>> @@ -22,7 +22,6 @@
>>>  #define HW_VFIO_VFIO_COMMON_H
>>>  
>>>  #include "qemu-common.h"
>>> -#include "exec/address-spaces.h"
>>>  #include "exec/memory.h"
>>>  #include "qemu/queue.h"
>>>  #include "qemu/notify.h"
>>> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
>>> index e67392c5f9..76e4e8c652 100644
>>> --- a/hw/vfio/ccw.c
>>> +++ b/hw/vfio/ccw.c
>>> @@ -22,6 +22,7 @@
>>>  #include "hw/vfio/vfio-common.h"
>>>  #include "hw/s390x/s390-ccw.h"
>>>  #include "hw/s390x/ccw-device.h"
>>> +#include "exec/address-spaces.h"
>>>  #include "qemu/error-report.h"
>>>  
>>>  #define TYPE_VFIO_CCW "vfio-ccw"
>>> diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
>>> index 5c921c27ba..57c4a0ee2b 100644
>>> --- a/hw/vfio/platform.c
>>> +++ b/hw/vfio/platform.c
>>> @@ -24,6 +24,7 @@
>>>  #include "qemu/range.h"
>>>  #include "sysemu/sysemu.h"
>>>  #include "exec/memory.h"
>>> +#include "exec/address-spaces.h"
>>>  #include "qemu/queue.h"
>>>  #include "hw/sysbus.h"
>>>  #include "trace.h"

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

* Re: [Qemu-devel] [PATCH v4 15/21] hw/block/nvme: Include "qemu/cutils.h" directly in the source file
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 15/21] hw/block/nvme: Include "qemu/cutils.h" directly in the source file Philippe Mathieu-Daudé
@ 2018-05-29  0:42   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-29  0:42 UTC (permalink / raw)
  To: Thomas Huth, Michael S . Tsirkin
  Cc: qemu-devel, qemu-trivial, Paolo Bonzini, Keith Busch, Kevin Wolf,
	Max Reitz, open list:nvme

On 05/28/2018 08:27 PM, Philippe Mathieu-Daudé wrote:

I forgot to add this commit description:

  "block/nvme.h" does not require any declaration of "qemu/cutils.h".
  Simplify dependencies by directly include it in the source file
  where the declarations are used.

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/block/nvme.h | 1 -
>  hw/block/nvme.c | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/block/nvme.h b/hw/block/nvme.h
> index 8f3981121d..cabcf20c32 100644
> --- a/hw/block/nvme.h
> +++ b/hw/block/nvme.h
> @@ -1,6 +1,5 @@
>  #ifndef HW_NVME_H
>  #define HW_NVME_H
> -#include "qemu/cutils.h"
>  #include "block/nvme.h"
>  
>  typedef struct NvmeAsyncEvent {
> diff --git a/hw/block/nvme.c b/hw/block/nvme.c
> index 85d2406400..811084b6a7 100644
> --- a/hw/block/nvme.c
> +++ b/hw/block/nvme.c
> @@ -35,6 +35,7 @@
>  #include "sysemu/block-backend.h"
>  
>  #include "qemu/log.h"
> +#include "qemu/cutils.h"
>  #include "trace.h"
>  #include "nvme.h"
>  
> 

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

* Re: [Qemu-devel] [PATCH v4 17/21] hw/misc/sga: Use the correct ISA include
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 17/21] hw/misc/sga: Use the correct ISA include Philippe Mathieu-Daudé
@ 2018-05-29  7:58   ` Marcel Apfelbaum
  0 siblings, 0 replies; 52+ messages in thread
From: Marcel Apfelbaum @ 2018-05-29  7:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, Michael S . Tsirkin
  Cc: qemu-devel, qemu-trivial, Paolo Bonzini



On 05/29/2018 02:27 AM, Philippe Mathieu-Daudé wrote:
> The SGA BIOS loader is an ISA device, it does not require the PCI header.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/misc/sga.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/misc/sga.c b/hw/misc/sga.c
> index 97fd63f176..4a22a52a60 100644
> --- a/hw/misc/sga.c
> +++ b/hw/misc/sga.c
> @@ -25,7 +25,7 @@
>    *
>    */
>   #include "qemu/osdep.h"
> -#include "hw/pci/pci.h"
> +#include "hw/isa/isa.h"
>   #include "hw/loader.h"
>   #include "sysemu/sysemu.h"
>   

Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>

Thanks,
Marcel

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

* Re: [Qemu-devel] [PATCH v4 19/21] hw/i386/pc: Remove unused include
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 19/21] hw/i386/pc: " Philippe Mathieu-Daudé
@ 2018-05-29  7:58   ` Marcel Apfelbaum
  0 siblings, 0 replies; 52+ messages in thread
From: Marcel Apfelbaum @ 2018-05-29  7:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, Michael S . Tsirkin
  Cc: qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost



On 05/29/2018 02:27 AM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/i386/pc.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index d768930d02..8b0803cb83 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -64,7 +64,6 @@
>   #include "hw/acpi/acpi.h"
>   #include "hw/acpi/cpu_hotplug.h"
>   #include "hw/boards.h"
> -#include "hw/pci/pci_host.h"
>   #include "acpi-build.h"
>   #include "hw/mem/pc-dimm.h"
>   #include "qapi/error.h"

Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>

Thanks,
Marcel

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

* Re: [Qemu-devel] [PATCH v4 10/21] hw: Do not include "exec/ioport.h" if it is not necessary
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 10/21] hw: Do not include "exec/ioport.h" " Philippe Mathieu-Daudé
@ 2018-05-29  7:59   ` Marcel Apfelbaum
  0 siblings, 0 replies; 52+ messages in thread
From: Marcel Apfelbaum @ 2018-05-29  7:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, Michael S . Tsirkin
  Cc: qemu-devel, qemu-trivial, Paolo Bonzini, Igor Mammedov



On 05/29/2018 02:27 AM, Philippe Mathieu-Daudé wrote:
> Code change produced with:
>      $ git grep '#include "exec/ioport.h"' hw | \
>        cut -d: -f-1 | \
>        xargs egrep -Li "(portio|cpu_(in|out).\()" | \
>        xargs sed -i.bak '/#include "exec\/ioport.h"/d'
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/acpi/pcihp.c | 1 -
>   hw/acpi/piix4.c | 1 -
>   2 files changed, 2 deletions(-)
>
> diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
> index 91c82fdc7a..80d42e12ff 100644
> --- a/hw/acpi/pcihp.c
> +++ b/hw/acpi/pcihp.c
> @@ -32,7 +32,6 @@
>   #include "hw/pci/pci.h"
>   #include "hw/acpi/acpi.h"
>   #include "sysemu/sysemu.h"
> -#include "exec/ioport.h"
>   #include "exec/address-spaces.h"
>   #include "hw/pci/pci_bus.h"
>   #include "qapi/error.h"
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index 8b703455b7..6404af5f33 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -28,7 +28,6 @@
>   #include "sysemu/sysemu.h"
>   #include "qapi/error.h"
>   #include "qemu/range.h"
> -#include "exec/ioport.h"
>   #include "hw/nvram/fw_cfg.h"
>   #include "exec/address-spaces.h"
>   #include "hw/acpi/piix4.h"

Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>

Thanks,
Marcel

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

* Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-29  0:36       ` Philippe Mathieu-Daudé
@ 2018-05-29  9:53         ` Cornelia Huck
  2018-05-29 10:45           ` Paolo Bonzini
  0 siblings, 1 reply; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29  9:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Michael S. Tsirkin, Alex Williamson, Thomas Huth, qemu-devel,
	qemu-trivial, Paolo Bonzini, open list:S390

On Mon, 28 May 2018 21:36:31 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> On 05/28/2018 09:06 PM, Michael S. Tsirkin wrote:
> > On Mon, May 28, 2018 at 05:48:05PM -0600, Alex Williamson wrote:  
> >> On Mon, 28 May 2018 20:26:59 -0300
> >> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>
> >> -ENOCOMMITLOG  
> 
> Oops sorry Alex, I meant to add some, but missed this while rebasing.
> 
> >> Why?  Tangible benefit.  Looks like noise.  Thanks,
> >>  
> > I agree it should have a commit log, but .c files
> > should be self-sufficient not rely on .h files
> > pulling in headers for symbols the .h does not use
> > itself.  
> 
> I meant:
> 
>   No declaration of "hw/vfio/vfio-common.h" directly requires to include
>   the "exec/address-spaces.h" header.  To simplify dependencies and
>   ease following cleanup of "exec/address-spaces.h", directly include
>   it in the source file where the declaration are used.
> 
> > This is better because it makes refactoring easier.
> >   
> >>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >>> ---
> >>>  include/hw/vfio/vfio-common.h | 1 -
> >>>  hw/vfio/ccw.c                 | 1 +
> >>>  hw/vfio/platform.c            | 1 +
> >>>  3 files changed, 2 insertions(+), 1 deletion(-)

With the description added:

Acked-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [Qemu-devel] [PATCH v4 03/21] target: Do not include "exec/address-spaces.h" if it is not necessary
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 03/21] target: " Philippe Mathieu-Daudé
@ 2018-05-29 10:05   ` Cornelia Huck
  0 siblings, 0 replies; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29 10:05 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Christian Borntraeger, Alexander Graf, David Hildenbrand,
	Mark Cave-Ayland, Artyom Tarasenko, open list:S390

On Mon, 28 May 2018 20:27:01 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Code change produced with:
>     $ git grep '#include "exec/address-spaces.h"' target | \
>       cut -d: -f-1 | \
>       xargs egrep -L "(get_system_|address_space_)" | \
>       xargs sed -i.bak '/#include "exec\/address-spaces.h"/d'
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/i386/hvf/x86_task.c | 1 -
>  target/s390x/kvm.c         | 1 -
>  target/s390x/mem_helper.c  | 1 -
>  target/s390x/misc_helper.c | 1 -
>  target/sparc/mmu_helper.c  | 1 -
>  5 files changed, 5 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [Qemu-devel] [PATCH v4 12/21] hw: Do not include "sysemu/block-backend.h" if it is not necessary
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
  (?)
  (?)
@ 2018-05-29 10:14   ` Cornelia Huck
  -1 siblings, 0 replies; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29 10:14 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Peter Maydell, Andrzej Zaborowski,
	Edgar E. Iglesias, Alistair Francis, Stefan Hajnoczi, Kevin Wolf,
	Max Reitz, John Snow, Michael Walle, Aurelien Jarno, Yongbok Kim,
	David Gibson, Alexander Graf, Christian Borntraeger,
	Richard Henderson, David Hildenbrand, Fam Zheng, Magnus Damm,
	Stefano Stabellini, Anthony Perard, Max Filippov, open list:ARM,
	open list:virtio-blk, open list:sPAPR, open list:virtio-ccw,
	open list:X86

On Mon, 28 May 2018 20:27:10 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Remove those unneeded includes to speed up the compilation
> process a little bit. (Continue 7eceff5b5a1fa cleanup)
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/arm/collie.c                          | 1 -
>  hw/arm/gumstix.c                         | 1 -
>  hw/arm/mainstone.c                       | 1 -
>  hw/arm/nseries.c                         | 1 -
>  hw/arm/omap1.c                           | 1 -
>  hw/arm/omap2.c                           | 1 -
>  hw/arm/omap_sx1.c                        | 1 -
>  hw/arm/pxa2xx.c                          | 1 -
>  hw/arm/spitz.c                           | 1 -
>  hw/arm/versatilepb.c                     | 1 -
>  hw/arm/vexpress.c                        | 1 -
>  hw/arm/virt.c                            | 1 -
>  hw/arm/xilinx_zynq.c                     | 1 -
>  hw/arm/z2.c                              | 1 -
>  hw/block/dataplane/virtio-blk.c          | 1 -
>  hw/block/virtio-blk.c                    | 1 -
>  hw/core/qdev-properties.c                | 1 -
>  hw/cris/axis_dev88.c                     | 1 -
>  hw/display/tc6393xb.c                    | 1 -
>  hw/ide/pci.c                             | 1 -
>  hw/ide/via.c                             | 1 -
>  hw/isa/isa-superio.c                     | 1 -
>  hw/lm32/lm32_boards.c                    | 1 -
>  hw/lm32/milkymist.c                      | 1 -
>  hw/microblaze/petalogix_ml605_mmu.c      | 1 -
>  hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
>  hw/mips/mips_r4k.c                       | 1 -
>  hw/ppc/spapr.c                           | 1 -
>  hw/ppc/virtex_ml507.c                    | 2 --
>  hw/s390x/virtio-ccw.c                    | 1 -
>  hw/scsi/mptsas.c                         | 1 -
>  hw/sd/pl181.c                            | 1 -
>  hw/sd/sdhci.c                            | 1 -
>  hw/sd/ssi-sd.c                           | 1 -
>  hw/sh4/r2d.c                             | 1 -
>  hw/virtio/virtio-pci.c                   | 1 -
>  hw/xen/xen_devconfig.c                   | 1 -
>  hw/xtensa/xtfpga.c                       | 1 -
>  38 files changed, 39 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [PATCH v4 12/21] hw: Do not include "sysemu/block-backend.h" if it is not necessary
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
  (?)
@ 2018-05-29 10:14   ` Cornelia Huck
  -1 siblings, 0 replies; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29 10:14 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Michael S . Tsirkin, qemu-devel, Max Filippov,
	Edgar E. Iglesias, Yongbok Kim, Stefano Stabellini,
	open list:virtio-blk, qemu-trivial, David Hildenbrand,
	Magnus Damm, Alexander Graf, Christian Borntraeger,
	Anthony Perard, open list:X86, David Gibson, Andrzej Zaborowski,
	Thomas Huth, Fam Zheng, Alistair Francis, open list:virtio-ccw,
	open list:ARM

On Mon, 28 May 2018 20:27:10 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Remove those unneeded includes to speed up the compilation
> process a little bit. (Continue 7eceff5b5a1fa cleanup)
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/arm/collie.c                          | 1 -
>  hw/arm/gumstix.c                         | 1 -
>  hw/arm/mainstone.c                       | 1 -
>  hw/arm/nseries.c                         | 1 -
>  hw/arm/omap1.c                           | 1 -
>  hw/arm/omap2.c                           | 1 -
>  hw/arm/omap_sx1.c                        | 1 -
>  hw/arm/pxa2xx.c                          | 1 -
>  hw/arm/spitz.c                           | 1 -
>  hw/arm/versatilepb.c                     | 1 -
>  hw/arm/vexpress.c                        | 1 -
>  hw/arm/virt.c                            | 1 -
>  hw/arm/xilinx_zynq.c                     | 1 -
>  hw/arm/z2.c                              | 1 -
>  hw/block/dataplane/virtio-blk.c          | 1 -
>  hw/block/virtio-blk.c                    | 1 -
>  hw/core/qdev-properties.c                | 1 -
>  hw/cris/axis_dev88.c                     | 1 -
>  hw/display/tc6393xb.c                    | 1 -
>  hw/ide/pci.c                             | 1 -
>  hw/ide/via.c                             | 1 -
>  hw/isa/isa-superio.c                     | 1 -
>  hw/lm32/lm32_boards.c                    | 1 -
>  hw/lm32/milkymist.c                      | 1 -
>  hw/microblaze/petalogix_ml605_mmu.c      | 1 -
>  hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
>  hw/mips/mips_r4k.c                       | 1 -
>  hw/ppc/spapr.c                           | 1 -
>  hw/ppc/virtex_ml507.c                    | 2 --
>  hw/s390x/virtio-ccw.c                    | 1 -
>  hw/scsi/mptsas.c                         | 1 -
>  hw/sd/pl181.c                            | 1 -
>  hw/sd/sdhci.c                            | 1 -
>  hw/sd/ssi-sd.c                           | 1 -
>  hw/sh4/r2d.c                             | 1 -
>  hw/virtio/virtio-pci.c                   | 1 -
>  hw/xen/xen_devconfig.c                   | 1 -
>  hw/xtensa/xtfpga.c                       | 1 -
>  38 files changed, 39 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-29  9:53         ` Cornelia Huck
@ 2018-05-29 10:45           ` Paolo Bonzini
  2018-05-29 13:09             ` Alex Williamson
  0 siblings, 1 reply; 52+ messages in thread
From: Paolo Bonzini @ 2018-05-29 10:45 UTC (permalink / raw)
  To: Cornelia Huck, Philippe Mathieu-Daudé
  Cc: Michael S. Tsirkin, Alex Williamson, Thomas Huth, qemu-devel,
	qemu-trivial, open list:S390

On 29/05/2018 11:53, Cornelia Huck wrote:
> On Mon, 28 May 2018 21:36:31 -0300
> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> 
>> On 05/28/2018 09:06 PM, Michael S. Tsirkin wrote:
>>> On Mon, May 28, 2018 at 05:48:05PM -0600, Alex Williamson wrote:  
>>>> On Mon, 28 May 2018 20:26:59 -0300
>>>> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>>>
>>>> -ENOCOMMITLOG  
>>
>> Oops sorry Alex, I meant to add some, but missed this while rebasing.
>>
>>>> Why?  Tangible benefit.  Looks like noise.  Thanks,
>>>>  
>>> I agree it should have a commit log, but .c files
>>> should be self-sufficient not rely on .h files
>>> pulling in headers for symbols the .h does not use
>>> itself.  
>>
>> I meant:
>>
>>   No declaration of "hw/vfio/vfio-common.h" directly requires to include
>>   the "exec/address-spaces.h" header.  To simplify dependencies and
>>   ease following cleanup of "exec/address-spaces.h", directly include
>>   it in the source file where the declaration are used.
>>
>>> This is better because it makes refactoring easier.
>>>   
>>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>>> ---
>>>>>  include/hw/vfio/vfio-common.h | 1 -
>>>>>  hw/vfio/ccw.c                 | 1 +
>>>>>  hw/vfio/platform.c            | 1 +
>>>>>  3 files changed, 2 insertions(+), 1 deletion(-)
> 
> With the description added:
> 
> Acked-by: Cornelia Huck <cohuck@redhat.com>
> 

Alex, is the description okay with you too?

Thanks,

Paolo

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

* Re: [Qemu-devel] [PATCH v4 14/21] hw: Do not include "sysemu/blockdev.h" if it is not necessary
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
  (?)
  (?)
@ 2018-05-29 11:03   ` Cornelia Huck
  -1 siblings, 0 replies; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29 11:03 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Peter Crosthwaite, Alistair Francis, Kevin Wolf,
	Max Reitz, Stefano Stabellini, Anthony Perard, Marcel Apfelbaum,
	Richard Henderson, Eduardo Habkost, Christian Borntraeger,
	Alexander Graf, David Hildenbrand, Fam Zheng, Gerd Hoffmann,
	Dr. David Alan Gilbert, Markus Armbruster,
	open list:Block layer core, open list:X86, open list:virtio-ccw

On Mon, 28 May 2018 20:27:12 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Remove those unneeded includes to speed up the compilation
> process a little bit.
> 
> Code change produced with:
> 
>     $ git grep '#include "sysemu/blockdev.h"' | \
>       cut -d: -f-1 | \
>       xargs egrep -L "(BlockInterfaceType|DriveInfo|drive_get|blk_legacy_dinfo|blockdev_mark_auto_del)" | \
>       xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/block/m25p80.c          | 1 -
>  hw/block/onenand.c         | 1 -
>  hw/i386/xen/xen-mapcache.c | 1 -
>  hw/s390x/virtio-ccw.c      | 1 -
>  hw/scsi/scsi-generic.c     | 1 -
>  hw/sd/sdhci.c              | 1 -
>  hw/usb/dev-storage.c       | 1 -
>  monitor.c                  | 1 -
>  8 files changed, 8 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [PATCH v4 14/21] hw: Do not include "sysemu/blockdev.h" if it is not necessary
  2018-05-28 23:27   ` Philippe Mathieu-Daudé
  (?)
@ 2018-05-29 11:03   ` Cornelia Huck
  -1 siblings, 0 replies; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29 11:03 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Michael S . Tsirkin, qemu-devel, Markus Armbruster,
	Gerd Hoffmann, Stefano Stabellini, open list:Block layer core,
	qemu-trivial, David Hildenbrand, Alexander Graf,
	Christian Borntraeger, Marcel Apfelbaum, Anthony Perard,
	open list:X86, Thomas Huth, Fam Zheng, Eduardo Habkost,
	Alistair Francis, Dr. David Alan Gilbert, open list:virtio-ccw,
	Richard Henderson, Kevin Wolf, Peter Crosthwaite, Max

On Mon, 28 May 2018 20:27:12 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Remove those unneeded includes to speed up the compilation
> process a little bit.
> 
> Code change produced with:
> 
>     $ git grep '#include "sysemu/blockdev.h"' | \
>       cut -d: -f-1 | \
>       xargs egrep -L "(BlockInterfaceType|DriveInfo|drive_get|blk_legacy_dinfo|blockdev_mark_auto_del)" | \
>       xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/block/m25p80.c          | 1 -
>  hw/block/onenand.c         | 1 -
>  hw/i386/xen/xen-mapcache.c | 1 -
>  hw/s390x/virtio-ccw.c      | 1 -
>  hw/scsi/scsi-generic.c     | 1 -
>  hw/sd/sdhci.c              | 1 -
>  hw/usb/dev-storage.c       | 1 -
>  monitor.c                  | 1 -
>  8 files changed, 8 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Qemu-devel] [PATCH v4 18/21] hw/hppa: Remove unused include
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 18/21] hw/hppa: Remove unused include Philippe Mathieu-Daudé
@ 2018-05-29 11:27   ` Thomas Huth
  0 siblings, 0 replies; 52+ messages in thread
From: Thomas Huth @ 2018-05-29 11:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Michael S . Tsirkin
  Cc: qemu-devel, qemu-trivial, Paolo Bonzini, Richard Henderson

On 29.05.2018 01:27, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/hppa/hppa_sys.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h
> index a182d1f34e..3f6c145120 100644
> --- a/hw/hppa/hppa_sys.h
> +++ b/hw/hppa/hppa_sys.h
> @@ -3,7 +3,6 @@
>  #ifndef HW_HPPA_SYS_H
>  #define HW_HPPA_SYS_H
>  
> -#include "target/hppa/cpu-qom.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_host.h"
>  #include "hw/ide.h"
> 

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

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

* Re: [Qemu-devel] [PATCH v4 20/21] hw/ide: Remove unused include
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 20/21] hw/ide: " Philippe Mathieu-Daudé
@ 2018-05-29 11:35   ` Thomas Huth
  2018-05-30 20:29   ` John Snow
  1 sibling, 0 replies; 52+ messages in thread
From: Thomas Huth @ 2018-05-29 11:35 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Michael S . Tsirkin
  Cc: open list:IDE, qemu-trivial, qemu-devel, Paolo Bonzini, John Snow

On 29.05.2018 01:27, Philippe Mathieu-Daudé wrote:
> There is no need to include pci.h in this file.
> (Continue f23c81073a cleanup).
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/ide/core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/ide/core.c b/hw/ide/core.c
> index 866c659498..cc9ca28c33 100644
> --- a/hw/ide/core.c
> +++ b/hw/ide/core.c
> @@ -25,7 +25,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "hw/hw.h"
> -#include "hw/pci/pci.h"
>  #include "hw/isa/isa.h"
>  #include "qemu/error-report.h"
>  #include "qemu/timer.h"
> 

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

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary Philippe Mathieu-Daudé
@ 2018-05-29 11:40   ` Cornelia Huck
  2018-05-30  3:12     ` Philippe Mathieu-Daudé
  2018-05-30 10:12   ` Cornelia Huck
  1 sibling, 1 reply; 52+ messages in thread
From: Cornelia Huck @ 2018-05-29 11:40 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

On Mon, 28 May 2018 20:27:07 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Code change produced with:
>     $ git grep '#include "exec/exec-all.h"' | \
>       cut -d: -f-1 | \
>       xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \

Hm, does this expression catch all files that need to include
exec-all.h? The resulting patch seems fine, though.

>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

* Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file
  2018-05-29 10:45           ` Paolo Bonzini
@ 2018-05-29 13:09             ` Alex Williamson
  0 siblings, 0 replies; 52+ messages in thread
From: Alex Williamson @ 2018-05-29 13:09 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Cornelia Huck, Philippe Mathieu-Daudé,
	Michael S. Tsirkin, Thomas Huth, qemu-devel, qemu-trivial,
	open list:S390

On Tue, 29 May 2018 12:45:28 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 29/05/2018 11:53, Cornelia Huck wrote:
> > On Mon, 28 May 2018 21:36:31 -0300
> > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >   
> >> On 05/28/2018 09:06 PM, Michael S. Tsirkin wrote:  
> >>> On Mon, May 28, 2018 at 05:48:05PM -0600, Alex Williamson wrote:    
> >>>> On Mon, 28 May 2018 20:26:59 -0300
> >>>> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>>>
> >>>> -ENOCOMMITLOG    
> >>
> >> Oops sorry Alex, I meant to add some, but missed this while rebasing.
> >>  
> >>>> Why?  Tangible benefit.  Looks like noise.  Thanks,
> >>>>    
> >>> I agree it should have a commit log, but .c files
> >>> should be self-sufficient not rely on .h files
> >>> pulling in headers for symbols the .h does not use
> >>> itself.    
> >>
> >> I meant:
> >>
> >>   No declaration of "hw/vfio/vfio-common.h" directly requires to include
> >>   the "exec/address-spaces.h" header.  To simplify dependencies and
> >>   ease following cleanup of "exec/address-spaces.h", directly include
> >>   it in the source file where the declaration are used.
> >>  
> >>> This is better because it makes refactoring easier.
> >>>     
> >>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >>>>> ---
> >>>>>  include/hw/vfio/vfio-common.h | 1 -
> >>>>>  hw/vfio/ccw.c                 | 1 +
> >>>>>  hw/vfio/platform.c            | 1 +
> >>>>>  3 files changed, 2 insertions(+), 1 deletion(-)  
> > 
> > With the description added:
> > 
> > Acked-by: Cornelia Huck <cohuck@redhat.com>
> >   
> 
> Alex, is the description okay with you too?

Yes, if someone wants to roll this on on commit,

Acked-by: Alex Williamson <alex.williamson@redhat.com>

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-29 11:40   ` Cornelia Huck
@ 2018-05-30  3:12     ` Philippe Mathieu-Daudé
  2018-05-30  4:42       ` Michael S. Tsirkin
  0 siblings, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-30  3:12 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

Hi Cornelia,

On 05/29/2018 08:40 AM, Cornelia Huck wrote:
> On Mon, 28 May 2018 20:27:07 -0300
> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> 
>> Code change produced with:
>>     $ git grep '#include "exec/exec-all.h"' | \
>>       cut -d: -f-1 | \
>>       xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \
> 
> Hm, does this expression catch all files that need to include
> exec-all.h? The resulting patch seems fine, though.

No, not all :/
I started with "(cpu_loop_|tlb_|tb_)" then kept brutebuilding until no
more errors appear. In 2 more steps I added "cpu_address_space_init|"
then "|GETPC|singlestep|TranslationBlock". Quick and dirty enough for my
goal than trying to build a regex to explode function/struct names from
headers. This is a clever way to do it for long term command reuse taken
from commit messages...

>>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-30  3:12     ` Philippe Mathieu-Daudé
@ 2018-05-30  4:42       ` Michael S. Tsirkin
  2018-05-30  5:50         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 52+ messages in thread
From: Michael S. Tsirkin @ 2018-05-30  4:42 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Cornelia Huck, Thomas Huth, qemu-devel, qemu-trivial,
	Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

On Wed, May 30, 2018 at 12:12:55AM -0300, Philippe Mathieu-Daudé wrote:
> Hi Cornelia,
> 
> On 05/29/2018 08:40 AM, Cornelia Huck wrote:
> > On Mon, 28 May 2018 20:27:07 -0300
> > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> > 
> >> Code change produced with:
> >>     $ git grep '#include "exec/exec-all.h"' | \
> >>       cut -d: -f-1 | \
> >>       xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \
> > 
> > Hm, does this expression catch all files that need to include
> > exec-all.h? The resulting patch seems fine, though.
> 
> No, not all :/
> I started with "(cpu_loop_|tlb_|tb_)" then kept brutebuilding until no
> more errors appear. In 2 more steps I added "cpu_address_space_init|"
> then "|GETPC|singlestep|TranslationBlock". Quick and dirty enough for my
> goal than trying to build a regex to explode function/struct names from
> headers. This is a clever way to do it for long term command reuse taken
> from commit messages...

Brutebuilding isn't a good way to find unused includes, some other header
might pull in an include you are trying to remove for its own purposes.
If you want to try brutebuilding you must also verify that's
not the case - e.g. look at the dependency file generated.

> >>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
> >>
> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-30  4:42       ` Michael S. Tsirkin
@ 2018-05-30  5:50         ` Philippe Mathieu-Daudé
  2018-05-30  6:19           ` Philippe Mathieu-Daudé
  2018-05-30  9:32           ` Paolo Bonzini
  0 siblings, 2 replies; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-30  5:50 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Cornelia Huck, Thomas Huth, qemu-devel@nongnu.org Developers,
	QEMU Trivial, Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

On Wed, May 30, 2018 at 1:42 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Wed, May 30, 2018 at 12:12:55AM -0300, Philippe Mathieu-Daudé wrote:
>> Hi Cornelia,
>>
>> On 05/29/2018 08:40 AM, Cornelia Huck wrote:
>> > On Mon, 28 May 2018 20:27:07 -0300
>> > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> >
>> >> Code change produced with:
>> >>     $ git grep '#include "exec/exec-all.h"' | \
>> >>       cut -d: -f-1 | \
>> >>       xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \
>> >
>> > Hm, does this expression catch all files that need to include
>> > exec-all.h? The resulting patch seems fine, though.
>>
>> No, not all :/
>> I started with "(cpu_loop_|tlb_|tb_)" then kept brutebuilding until no
>> more errors appear. In 2 more steps I added "cpu_address_space_init|"
>> then "|GETPC|singlestep|TranslationBlock". Quick and dirty enough for my
>> goal than trying to build a regex to explode function/struct names from
>> headers. This is a clever way to do it for long term command reuse taken
>> from commit messages...
>
> Brutebuilding isn't a good way to find unused includes, some other header
> might pull in an include you are trying to remove for its own purposes.
> If you want to try brutebuilding you must also verify that's
> not the case - e.g. look at the dependency file generated.

Hmm you mean the .d files in the build dir?

i.e.
$ find lm32-softmmu -name \*.d -exec fgrep -L exec-all.h {} \; | sed
-e 's/.*-softmmu\/\(.*\)d$/\1c/'
dump.c
numa.c
tcg/tcg-common.c
tcg/optimize.c
tcg/tcg-op-gvec.c
tcg/tcg-op-vec.c
accel/tcg/tcg-runtime-gvec.c
accel/tcg/tcg-all.c
accel/accel.c
accel/stubs/whpx-stub.c
accel/stubs/hvf-stub.c
accel/stubs/kvm-stub.c
accel/stubs/hax-stub.c
hw/lm32/milkymist.c
hw/lm32/lm32_boards.c
hw/core/generic-loader.c
...

Then look why each .c included it?

>
>> >>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
>> >>
>> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-30  5:50         ` Philippe Mathieu-Daudé
@ 2018-05-30  6:19           ` Philippe Mathieu-Daudé
  2018-05-30 12:55             ` Michael S. Tsirkin
  2018-05-30  9:32           ` Paolo Bonzini
  1 sibling, 1 reply; 52+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-30  6:19 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Cornelia Huck, Thomas Huth, qemu-devel@nongnu.org Developers,
	QEMU Trivial, Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

Le mer. 30 mai 2018 02:50, Philippe Mathieu-Daudé <f4bug@amsat.org> a
écrit :

> On Wed, May 30, 2018 at 1:42 AM, Michael S. Tsirkin <mst@redhat.com>
> wrote:
> > On Wed, May 30, 2018 at 12:12:55AM -0300, Philippe Mathieu-Daudé wrote:
> >> Hi Cornelia,
> >>
> >> On 05/29/2018 08:40 AM, Cornelia Huck wrote:
> >> > On Mon, 28 May 2018 20:27:07 -0300
> >> > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >> >
> >> >> Code change produced with:
> >> >>     $ git grep '#include "exec/exec-all.h"' | \
> >> >>       cut -d: -f-1 | \
> >> >>       xargs egrep -L
> "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)"
> | \
> >> >
> >> > Hm, does this expression catch all files that need to include
> >> > exec-all.h? The resulting patch seems fine, though.
> >>
> >> No, not all :/
> >> I started with "(cpu_loop_|tlb_|tb_)" then kept brutebuilding until no
> >> more errors appear. In 2 more steps I added "cpu_address_space_init|"
> >> then "|GETPC|singlestep|TranslationBlock". Quick and dirty enough for my
> >> goal than trying to build a regex to explode function/struct names from
> >> headers. This is a clever way to do it for long term command reuse taken
> >> from commit messages...
> >
> > Brutebuilding isn't a good way to find unused includes, some other header
> > might pull in an include you are trying to remove for its own purposes.
> > If you want to try brutebuilding you must also verify that's
> > not the case - e.g. look at the dependency file generated.
>

I think I get it for headers, but here I'm only modifying .c source files.
I'll restrict the shell command to .c


> Hmm you mean the .d files in the build dir?
>
> i.e.
> $ find lm32-softmmu -name \*.d -exec fgrep -L exec-all.h {} \; | sed
> -e 's/.*-softmmu\/\(.*\)d$/\1c/'
> dump.c
> numa.c
> tcg/tcg-common.c
> tcg/optimize.c
> tcg/tcg-op-gvec.c
> tcg/tcg-op-vec.c
> accel/tcg/tcg-runtime-gvec.c
> accel/tcg/tcg-all.c
> accel/accel.c
> accel/stubs/whpx-stub.c
> accel/stubs/hvf-stub.c
> accel/stubs/kvm-stub.c
> accel/stubs/hax-stub.c
> hw/lm32/milkymist.c
> hw/lm32/lm32_boards.c
> hw/core/generic-loader.c
> ...
>
> Then look why each .c included it?
>
> >
> >> >>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
> >> >>
> >> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-30  5:50         ` Philippe Mathieu-Daudé
  2018-05-30  6:19           ` Philippe Mathieu-Daudé
@ 2018-05-30  9:32           ` Paolo Bonzini
  1 sibling, 0 replies; 52+ messages in thread
From: Paolo Bonzini @ 2018-05-30  9:32 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Michael S. Tsirkin
  Cc: Cornelia Huck, Thomas Huth, qemu-devel@nongnu.org Developers,
	QEMU Trivial, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

On 30/05/2018 07:50, Philippe Mathieu-Daudé wrote:
>>> No, not all :/
>>> I started with "(cpu_loop_|tlb_|tb_)" then kept brutebuilding until no
>>> more errors appear. In 2 more steps I added "cpu_address_space_init|"
>>> then "|GETPC|singlestep|TranslationBlock". Quick and dirty enough for my
>>> goal than trying to build a regex to explode function/struct names from
>>> headers. This is a clever way to do it for long term command reuse taken
>>> from commit messages...
>> Brutebuilding isn't a good way to find unused includes, some other header
>> might pull in an include you are trying to remove for its own purposes.
>> If you want to try brutebuilding you must also verify that's
>> not the case - e.g. look at the dependency file generated.
> Hmm you mean the .d files in the build dir?

You can also check which include files include this one.  In this case
you can see that brute-building was more or less enough:

$ git grep -l exec-all -- '*.h'
accel/tcg/translate-all.h
include/exec/tb-lookup.h
include/exec/translator.h
linux-user/qemu.h
target/ppc/helper_regs.h

Leaving aside linux-user/qemu.h, let's check which files include one of
those headers, but they do not include exec/exec-all.h:

$ git grep -L exec-all \
   $(git grep -lFf <(git grep -l exec-all -- '*.h' | \
     grep -v qemu.h | sed 's,.*/,,'))
linux-user/mmap.c
target/arm/translate.h
target/ppc/int_helper.c
trace/control-target.c

I'll send some patches shortly to fix up what's left.

Paolo

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary Philippe Mathieu-Daudé
  2018-05-29 11:40   ` Cornelia Huck
@ 2018-05-30 10:12   ` Cornelia Huck
  1 sibling, 0 replies; 52+ messages in thread
From: Cornelia Huck @ 2018-05-30 10:12 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Michael S . Tsirkin, qemu-devel, qemu-trivial,
	Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

On Mon, 28 May 2018 20:27:07 -0300
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Code change produced with:
>     $ git grep '#include "exec/exec-all.h"' | \
>       cut -d: -f-1 | \
>       xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \
>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  bsd-user/qemu.h                        | 1 -
>  target/arm/arm_ldst.h                  | 1 -
>  hw/i386/kvmvapic.c                     | 1 -
>  target/arm/arm-powerctl.c              | 1 -
>  target/arm/crypto_helper.c             | 1 -
>  target/arm/iwmmxt_helper.c             | 1 -
>  target/arm/neon_helper.c               | 1 -
>  target/arm/psci.c                      | 1 -
>  target/arm/vec_helper.c                | 1 -
>  target/cris/cpu.c                      | 1 -
>  target/hppa/helper.c                   | 1 -
>  target/hppa/int_helper.c               | 1 -
>  target/i386/hax-all.c                  | 1 -
>  target/i386/hax-mem.c                  | 1 -
>  target/i386/hax-windows.c              | 1 -
>  target/i386/hvf/hvf.c                  | 1 -
>  target/i386/hvf/x86_task.c             | 1 -
>  target/i386/whpx-all.c                 | 1 -
>  target/lm32/cpu.c                      | 1 -
>  target/m68k/cpu.c                      | 1 -
>  target/moxie/cpu.c                     | 1 -
>  target/moxie/mmu.c                     | 1 -
>  target/openrisc/cpu.c                  | 1 -
>  target/ppc/int_helper.c                | 1 -
>  target/s390x/cpu.c                     | 1 -
>  target/s390x/diag.c                    | 1 -
>  target/s390x/helper.c                  | 1 -
>  target/tilegx/cpu.c                    | 1 -
>  target/xtensa/core-dc232b.c            | 1 -
>  target/xtensa/core-dc233c.c            | 1 -
>  target/xtensa/core-de212.c             | 1 -
>  target/xtensa/core-fsf.c               | 1 -
>  target/xtensa/core-sample_controller.c | 1 -
>  target/xtensa/cpu.c                    | 1 -
>  tcg/tcg-op-vec.c                       | 1 -
>  target/xtensa/import_core.sh           | 1 -
>  36 files changed, 36 deletions(-)
> 

However you arrived at it, this looks sane, so

Acked-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary
  2018-05-30  6:19           ` Philippe Mathieu-Daudé
@ 2018-05-30 12:55             ` Michael S. Tsirkin
  0 siblings, 0 replies; 52+ messages in thread
From: Michael S. Tsirkin @ 2018-05-30 12:55 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Cornelia Huck, Thomas Huth, qemu-devel@nongnu.org Developers,
	QEMU Trivial, Paolo Bonzini, Richard Henderson, Eduardo Habkost,
	Marcel Apfelbaum, Peter Maydell, Edgar E. Iglesias,
	Michael Walle, Laurent Vivier, Anthony Green, Stafford Horne,
	David Gibson, Alexander Graf, David Hildenbrand, Max Filippov,
	open list:ARM, open list:PowerPC, open list:S390

On Wed, May 30, 2018 at 03:19:19AM -0300, Philippe Mathieu-Daudé wrote:
> Le mer. 30 mai 2018 02:50, Philippe Mathieu-Daudé <f4bug@amsat.org> a écrit :
> 
>     On Wed, May 30, 2018 at 1:42 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
>     > On Wed, May 30, 2018 at 12:12:55AM -0300, Philippe Mathieu-Daudé wrote:
>     >> Hi Cornelia,
>     >>
>     >> On 05/29/2018 08:40 AM, Cornelia Huck wrote:
>     >> > On Mon, 28 May 2018 20:27:07 -0300
>     >> > Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>     >> >
>     >> >> Code change produced with:
>     >> >>     $ git grep '#include "exec/exec-all.h"' | \
>     >> >>       cut -d: -f-1 | \
>     >> >>       xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|
>     GETPC|singlestep|TranslationBlock)" | \
>     >> >
>     >> > Hm, does this expression catch all files that need to include
>     >> > exec-all.h? The resulting patch seems fine, though.
>     >>
>     >> No, not all :/
>     >> I started with "(cpu_loop_|tlb_|tb_)" then kept brutebuilding until no
>     >> more errors appear. In 2 more steps I added "cpu_address_space_init|"
>     >> then "|GETPC|singlestep|TranslationBlock". Quick and dirty enough for my
>     >> goal than trying to build a regex to explode function/struct names from
>     >> headers. This is a clever way to do it for long term command reuse taken
>     >> from commit messages...
>     >
>     > Brutebuilding isn't a good way to find unused includes, some other header
>     > might pull in an include you are trying to remove for its own purposes.
>     > If you want to try brutebuilding you must also verify that's
>     > not the case - e.g. look at the dependency file generated.
> 
> 
> I think I get it for headers, but here I'm only modifying .c source files. 

Same thing - if you call a function from a header, you should include
that header even if some other header happens to pull it in.
Otherwise someone might cleanup that other header and suddenly
your build breaks.



> I'll restrict the shell command to .c 

I don't think it matters.

> 
> 
>     Hmm you mean the .d files in the build dir?
> 
>     i.e.
>     $ find lm32-softmmu -name \*.d -exec fgrep -L exec-all.h {} \; | sed
>     -e 's/.*-softmmu\/\(.*\)d$/\1c/'
>     dump.c
>     numa.c
>     tcg/tcg-common.c
>     tcg/optimize.c
>     tcg/tcg-op-gvec.c
>     tcg/tcg-op-vec.c
>     accel/tcg/tcg-runtime-gvec.c
>     accel/tcg/tcg-all.c
>     accel/accel.c
>     accel/stubs/whpx-stub.c
>     accel/stubs/hvf-stub.c
>     accel/stubs/kvm-stub.c
>     accel/stubs/hax-stub.c
>     hw/lm32/milkymist.c
>     hw/lm32/lm32_boards.c
>     hw/core/generic-loader.c
>     ...
> 
>     Then look why each .c included it?
> 
>     >
>     >> >>       xargs sed -i.bak '/#include "exec\/exec-all.h"/d'
>     >> >>
>     >> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 

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

* Re: [Qemu-devel] [PATCH v4 20/21] hw/ide: Remove unused include
  2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 20/21] hw/ide: " Philippe Mathieu-Daudé
  2018-05-29 11:35   ` Thomas Huth
@ 2018-05-30 20:29   ` John Snow
  1 sibling, 0 replies; 52+ messages in thread
From: John Snow @ 2018-05-30 20:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, Michael S . Tsirkin
  Cc: open list:IDE, qemu-trivial, qemu-devel, Paolo Bonzini



On 05/28/2018 07:27 PM, Philippe Mathieu-Daudé wrote:
> There is no need to include pci.h in this file.
> (Continue f23c81073a cleanup).
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Acked-by: John Snow <jsnow@redhat.com>

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

end of thread, other threads:[~2018-05-30 20:29 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 23:26 [Qemu-devel] [PATCH v4 00/21] Includes cleanup Philippe Mathieu-Daudé
2018-05-28 23:26 ` [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file Philippe Mathieu-Daudé
2018-05-28 23:48   ` Alex Williamson
2018-05-29  0:06     ` Michael S. Tsirkin
2018-05-29  0:36       ` Philippe Mathieu-Daudé
2018-05-29  9:53         ` Cornelia Huck
2018-05-29 10:45           ` Paolo Bonzini
2018-05-29 13:09             ` Alex Williamson
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 02/21] accel: Do not include "exec/address-spaces.h" if it is not necessary Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 03/21] target: " Philippe Mathieu-Daudé
2018-05-29 10:05   ` Cornelia Huck
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 04/21] memory: Do not include "exec/ioport.h" " Philippe Mathieu-Daudé
2018-05-28 23:27 ` [PATCH v4 05/21] target/i386: " Philippe Mathieu-Daudé
2018-05-28 23:27   ` [Qemu-devel] " Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 06/21] target/xtensa: Include "qemu/timer.h" to use NANOSECONDS_PER_SECOND Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 07/21] target/ppc: Include "exec/exec-all.h" which provides tlb_flush() Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 08/21] target/hppa: Include "qemu/log.h" to use qemu_log() Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 09/21] target: Do not include "exec/exec-all.h" if it is not necessary Philippe Mathieu-Daudé
2018-05-29 11:40   ` Cornelia Huck
2018-05-30  3:12     ` Philippe Mathieu-Daudé
2018-05-30  4:42       ` Michael S. Tsirkin
2018-05-30  5:50         ` Philippe Mathieu-Daudé
2018-05-30  6:19           ` Philippe Mathieu-Daudé
2018-05-30 12:55             ` Michael S. Tsirkin
2018-05-30  9:32           ` Paolo Bonzini
2018-05-30 10:12   ` Cornelia Huck
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 10/21] hw: Do not include "exec/ioport.h" " Philippe Mathieu-Daudé
2018-05-29  7:59   ` Marcel Apfelbaum
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 11/21] hw: Do not include "exec/address-spaces.h" " Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 12/21] hw: Do not include "sysemu/block-backend.h" " Philippe Mathieu-Daudé
2018-05-28 23:27   ` Philippe Mathieu-Daudé
2018-05-29 10:14   ` Cornelia Huck
2018-05-29 10:14   ` [Qemu-devel] " Cornelia Huck
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 13/21] hw: Do not include "sysemu/blockdev.h" " Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 14/21] " Philippe Mathieu-Daudé
2018-05-28 23:27   ` Philippe Mathieu-Daudé
2018-05-29 11:03   ` Cornelia Huck
2018-05-29 11:03   ` [Qemu-devel] " Cornelia Huck
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 15/21] hw/block/nvme: Include "qemu/cutils.h" directly in the source file Philippe Mathieu-Daudé
2018-05-29  0:42   ` Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 16/21] hw/misc/mips_itu: Cleanup includes Philippe Mathieu-Daudé
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 17/21] hw/misc/sga: Use the correct ISA include Philippe Mathieu-Daudé
2018-05-29  7:58   ` Marcel Apfelbaum
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 18/21] hw/hppa: Remove unused include Philippe Mathieu-Daudé
2018-05-29 11:27   ` Thomas Huth
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 19/21] hw/i386/pc: " Philippe Mathieu-Daudé
2018-05-29  7:58   ` Marcel Apfelbaum
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 20/21] hw/ide: " Philippe Mathieu-Daudé
2018-05-29 11:35   ` Thomas Huth
2018-05-30 20:29   ` John Snow
2018-05-28 23:27 ` [Qemu-devel] [PATCH v4 21/21] hw: Clean "hw/devices.h" includes Philippe Mathieu-Daudé
2018-05-29  0:07 ` [Qemu-devel] [PATCH v4 00/21] Includes cleanup Michael S. Tsirkin

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.