All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Clean up includes
@ 2018-12-04 17:25 ` Markus Armbruster
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Armbruster @ 2018-12-04 17:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Viktor Prutyanov, Yuval Shaia, Marcel Apfelbaum, Cornelia Huck,
	Alex Williamson, Christian Borntraeger, Tony Krowiak,
	Halil Pasic, Pierre Morel, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Michael Clark, Palmer Dabbelt, Alistair Francis,
	Sagar Karandikar, Bastian Koppelmann, Stefan Berger, qemu-s390x,
	qemu-riscv

Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes, with the changes
to the following files manually reverted:

    contrib/libvhost-user/libvhost-user-glib.h
    contrib/libvhost-user/libvhost-user.c
    contrib/libvhost-user/libvhost-user.h
    linux-user/mips64/cpu_loop.c
    linux-user/mips64/signal.c
    linux-user/sparc64/cpu_loop.c
    linux-user/sparc64/signal.c
    linux-user/x86_64/cpu_loop.c
    linux-user/x86_64/signal.c
    target/s390x/gen-features.c
    tests/migration/s390x/a-b-bios.c
    tests/test-rcu-simpleq.c
    tests/test-rcu-tailq.c

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 contrib/elf2dmp/pdb.h                     | 2 --
 contrib/elf2dmp/pe.h                      | 1 -
 contrib/elf2dmp/qemu_elf.h                | 1 -
 contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
 contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -
 hw/rdma/rdma_utils.c                      | 1 +
 hw/rdma/rdma_utils.h                      | 1 -
 hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -
 hw/vfio/ap.c                              | 2 +-
 include/qemu/vfio-helpers.h               | 1 -
 include/sysemu/whpx.h                     | 1 -
 target/i386/sev.c                         | 3 ++-
 target/i386/whp-dispatch.h                | 1 -
 target/riscv/fpu_helper.c                 | 1 -
 tests/fp/platform.h                       | 1 -
 tests/tpm-util.h                          | 1 -
 tests/vhost-user-bridge.c                 | 2 +-
 util/qemu-thread-common.h                 | 1 -
 18 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/contrib/elf2dmp/pdb.h b/contrib/elf2dmp/pdb.h
index 4351a2dd61..a3a3cac2c1 100644
--- a/contrib/elf2dmp/pdb.h
+++ b/contrib/elf2dmp/pdb.h
@@ -8,8 +8,6 @@
 #ifndef PDB_H
 #define PDB_H
 
-#include <stdint.h>
-#include <stdlib.h>
 
 typedef struct GUID {
     unsigned int Data1;
diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h
index 374e06a9c5..dafb26afbb 100644
--- a/contrib/elf2dmp/pe.h
+++ b/contrib/elf2dmp/pe.h
@@ -8,7 +8,6 @@
 #ifndef PE_H
 #define PE_H
 
-#include <stdint.h>
 
 typedef struct IMAGE_DOS_HEADER {
     uint16_t  e_magic;      /* 0x00: MZ Header signature */
diff --git a/contrib/elf2dmp/qemu_elf.h b/contrib/elf2dmp/qemu_elf.h
index d85d6558fa..86e6e688fb 100644
--- a/contrib/elf2dmp/qemu_elf.h
+++ b/contrib/elf2dmp/qemu_elf.h
@@ -8,7 +8,6 @@
 #ifndef QEMU_ELF_H
 #define QEMU_ELF_H
 
-#include <stdint.h>
 #include <elf.h>
 
 typedef struct QEMUCPUSegment {
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
index 571f114a56..858221ad95 100644
--- a/contrib/vhost-user-blk/vhost-user-blk.c
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
@@ -20,7 +20,6 @@
 #include "contrib/libvhost-user/libvhost-user-glib.h"
 #include "contrib/libvhost-user/libvhost-user.h"
 
-#include <glib.h>
 
 struct virtio_blk_inhdr {
     unsigned char status;
diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
index 02c29019d1..496dd6e693 100644
--- a/contrib/vhost-user-scsi/vhost-user-scsi.c
+++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
@@ -16,7 +16,6 @@
 #include "contrib/libvhost-user/libvhost-user-glib.h"
 #include "standard-headers/linux/virtio_scsi.h"
 
-#include <glib.h>
 
 #define VUS_ISCSI_INITIATOR "iqn.2016-11.com.nutanix:vhost-user-scsi"
 
diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_utils.c
index dc23f158f3..4fbea8cde2 100644
--- a/hw/rdma/rdma_utils.c
+++ b/hw/rdma/rdma_utils.c
@@ -13,6 +13,7 @@
  *
  */
 
+#include "qemu/osdep.h"
 #include "rdma_utils.h"
 
 #ifdef PVRDMA_DEBUG
diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h
index 04c7c2ef5b..c4f96c4f2a 100644
--- a/hw/rdma/rdma_utils.h
+++ b/hw/rdma/rdma_utils.h
@@ -17,7 +17,6 @@
 #ifndef RDMA_UTILS_H
 #define RDMA_UTILS_H
 
-#include "qemu/osdep.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
 
diff --git a/hw/rdma/vmw/pvrdma_dev_ring.h b/hw/rdma/vmw/pvrdma_dev_ring.h
index 411d244603..5f2a0cf9b9 100644
--- a/hw/rdma/vmw/pvrdma_dev_ring.h
+++ b/hw/rdma/vmw/pvrdma_dev_ring.h
@@ -16,7 +16,6 @@
 #ifndef PVRDMA_DEV_RING_H
 #define PVRDMA_DEV_RING_H
 
-#include "qemu/typedefs.h"
 
 #define MAX_RING_NAME_SZ 32
 
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 65de952f44..32b880213d 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -10,9 +10,9 @@
  * directory.
  */
 
+#include "qemu/osdep.h"
 #include <linux/vfio.h>
 #include <sys/ioctl.h>
-#include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
 #include "hw/vfio/vfio.h"
diff --git a/include/qemu/vfio-helpers.h b/include/qemu/vfio-helpers.h
index ce7e7b057f..1f057c2b9e 100644
--- a/include/qemu/vfio-helpers.h
+++ b/include/qemu/vfio-helpers.h
@@ -12,7 +12,6 @@
 
 #ifndef QEMU_VFIO_HELPERS_H
 #define QEMU_VFIO_HELPERS_H
-#include "qemu/typedefs.h"
 
 typedef struct QEMUVFIOState QEMUVFIOState;
 
diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
index 89592ae4fa..d200ee01d0 100644
--- a/include/sysemu/whpx.h
+++ b/include/sysemu/whpx.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_WHPX_H
 #define QEMU_WHPX_H
 
-#include "config-host.h"
 #include "qemu-common.h"
 
 int whpx_init_vcpu(CPUState *cpu);
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 2395171acf..20b2d325d8 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -11,12 +11,13 @@
  *
  */
 
+#include "qemu/osdep.h"
+
 #include <linux/kvm.h>
 #include <linux/psp-sev.h>
 
 #include <sys/ioctl.h>
 
-#include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qom/object_interfaces.h"
 #include "qemu/base64.h"
diff --git a/target/i386/whp-dispatch.h b/target/i386/whp-dispatch.h
index d8d3485976..4ae3cc8fa5 100644
--- a/target/i386/whp-dispatch.h
+++ b/target/i386/whp-dispatch.h
@@ -1,5 +1,4 @@
 #include "windows.h"
-#include <stdbool.h>
 
 #include <WinHvPlatform.h>
 #include <WinHvEmulation.h>
diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
index fdb87d8d82..01b45ca0ae 100644
--- a/target/riscv/fpu_helper.c
+++ b/target/riscv/fpu_helper.c
@@ -17,7 +17,6 @@
  */
 
 #include "qemu/osdep.h"
-#include <stdlib.h>
 #include "cpu.h"
 #include "qemu/host-utils.h"
 #include "exec/exec-all.h"
diff --git a/tests/fp/platform.h b/tests/fp/platform.h
index c20ba70baa..f8c423dde3 100644
--- a/tests/fp/platform.h
+++ b/tests/fp/platform.h
@@ -29,7 +29,6 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "config-host.h"
 
 #ifndef HOST_WORDS_BIGENDIAN
 #define LITTLEENDIAN 1
diff --git a/tests/tpm-util.h b/tests/tpm-util.h
index 9e98bc5124..5755698ad2 100644
--- a/tests/tpm-util.h
+++ b/tests/tpm-util.h
@@ -13,7 +13,6 @@
 #ifndef TESTS_TPM_UTIL_H
 #define TESTS_TPM_UTIL_H
 
-#include "qemu/osdep.h"
 #include "io/channel-socket.h"
 
 typedef void (tx_func)(QTestState *s,
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 0cf8d0baca..0033b61f2e 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -29,8 +29,8 @@
 
 #define _FILE_OFFSET_BITS 64
 
-#include "qemu/atomic.h"
 #include "qemu/osdep.h"
+#include "qemu/atomic.h"
 #include "qemu/iov.h"
 #include "standard-headers/linux/virtio_net.h"
 #include "contrib/libvhost-user/libvhost-user.h"
diff --git a/util/qemu-thread-common.h b/util/qemu-thread-common.h
index a0ea7c0d92..2af6b12085 100644
--- a/util/qemu-thread-common.h
+++ b/util/qemu-thread-common.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_THREAD_COMMON_H
 #define QEMU_THREAD_COMMON_H
 
-#include "qemu/typedefs.h"
 #include "qemu/thread.h"
 #include "trace.h"
 
-- 
2.17.2

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

* [Qemu-riscv] [PATCH] Clean up includes
@ 2018-12-04 17:25 ` Markus Armbruster
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Armbruster @ 2018-12-04 17:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Viktor Prutyanov, Yuval Shaia, Marcel Apfelbaum, Cornelia Huck,
	Alex Williamson, Christian Borntraeger, Tony Krowiak,
	Halil Pasic, Pierre Morel, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Michael Clark, Palmer Dabbelt, Alistair Francis,
	Sagar Karandikar, Bastian Koppelmann, Stefan Berger, qemu-s390x,
	qemu-riscv

Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes, with the changes
to the following files manually reverted:

    contrib/libvhost-user/libvhost-user-glib.h
    contrib/libvhost-user/libvhost-user.c
    contrib/libvhost-user/libvhost-user.h
    linux-user/mips64/cpu_loop.c
    linux-user/mips64/signal.c
    linux-user/sparc64/cpu_loop.c
    linux-user/sparc64/signal.c
    linux-user/x86_64/cpu_loop.c
    linux-user/x86_64/signal.c
    target/s390x/gen-features.c
    tests/migration/s390x/a-b-bios.c
    tests/test-rcu-simpleq.c
    tests/test-rcu-tailq.c

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 contrib/elf2dmp/pdb.h                     | 2 --
 contrib/elf2dmp/pe.h                      | 1 -
 contrib/elf2dmp/qemu_elf.h                | 1 -
 contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
 contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -
 hw/rdma/rdma_utils.c                      | 1 +
 hw/rdma/rdma_utils.h                      | 1 -
 hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -
 hw/vfio/ap.c                              | 2 +-
 include/qemu/vfio-helpers.h               | 1 -
 include/sysemu/whpx.h                     | 1 -
 target/i386/sev.c                         | 3 ++-
 target/i386/whp-dispatch.h                | 1 -
 target/riscv/fpu_helper.c                 | 1 -
 tests/fp/platform.h                       | 1 -
 tests/tpm-util.h                          | 1 -
 tests/vhost-user-bridge.c                 | 2 +-
 util/qemu-thread-common.h                 | 1 -
 18 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/contrib/elf2dmp/pdb.h b/contrib/elf2dmp/pdb.h
index 4351a2dd61..a3a3cac2c1 100644
--- a/contrib/elf2dmp/pdb.h
+++ b/contrib/elf2dmp/pdb.h
@@ -8,8 +8,6 @@
 #ifndef PDB_H
 #define PDB_H
 
-#include <stdint.h>
-#include <stdlib.h>
 
 typedef struct GUID {
     unsigned int Data1;
diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h
index 374e06a9c5..dafb26afbb 100644
--- a/contrib/elf2dmp/pe.h
+++ b/contrib/elf2dmp/pe.h
@@ -8,7 +8,6 @@
 #ifndef PE_H
 #define PE_H
 
-#include <stdint.h>
 
 typedef struct IMAGE_DOS_HEADER {
     uint16_t  e_magic;      /* 0x00: MZ Header signature */
diff --git a/contrib/elf2dmp/qemu_elf.h b/contrib/elf2dmp/qemu_elf.h
index d85d6558fa..86e6e688fb 100644
--- a/contrib/elf2dmp/qemu_elf.h
+++ b/contrib/elf2dmp/qemu_elf.h
@@ -8,7 +8,6 @@
 #ifndef QEMU_ELF_H
 #define QEMU_ELF_H
 
-#include <stdint.h>
 #include <elf.h>
 
 typedef struct QEMUCPUSegment {
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
index 571f114a56..858221ad95 100644
--- a/contrib/vhost-user-blk/vhost-user-blk.c
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
@@ -20,7 +20,6 @@
 #include "contrib/libvhost-user/libvhost-user-glib.h"
 #include "contrib/libvhost-user/libvhost-user.h"
 
-#include <glib.h>
 
 struct virtio_blk_inhdr {
     unsigned char status;
diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
index 02c29019d1..496dd6e693 100644
--- a/contrib/vhost-user-scsi/vhost-user-scsi.c
+++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
@@ -16,7 +16,6 @@
 #include "contrib/libvhost-user/libvhost-user-glib.h"
 #include "standard-headers/linux/virtio_scsi.h"
 
-#include <glib.h>
 
 #define VUS_ISCSI_INITIATOR "iqn.2016-11.com.nutanix:vhost-user-scsi"
 
diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_utils.c
index dc23f158f3..4fbea8cde2 100644
--- a/hw/rdma/rdma_utils.c
+++ b/hw/rdma/rdma_utils.c
@@ -13,6 +13,7 @@
  *
  */
 
+#include "qemu/osdep.h"
 #include "rdma_utils.h"
 
 #ifdef PVRDMA_DEBUG
diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h
index 04c7c2ef5b..c4f96c4f2a 100644
--- a/hw/rdma/rdma_utils.h
+++ b/hw/rdma/rdma_utils.h
@@ -17,7 +17,6 @@
 #ifndef RDMA_UTILS_H
 #define RDMA_UTILS_H
 
-#include "qemu/osdep.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
 
diff --git a/hw/rdma/vmw/pvrdma_dev_ring.h b/hw/rdma/vmw/pvrdma_dev_ring.h
index 411d244603..5f2a0cf9b9 100644
--- a/hw/rdma/vmw/pvrdma_dev_ring.h
+++ b/hw/rdma/vmw/pvrdma_dev_ring.h
@@ -16,7 +16,6 @@
 #ifndef PVRDMA_DEV_RING_H
 #define PVRDMA_DEV_RING_H
 
-#include "qemu/typedefs.h"
 
 #define MAX_RING_NAME_SZ 32
 
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 65de952f44..32b880213d 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -10,9 +10,9 @@
  * directory.
  */
 
+#include "qemu/osdep.h"
 #include <linux/vfio.h>
 #include <sys/ioctl.h>
-#include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
 #include "hw/vfio/vfio.h"
diff --git a/include/qemu/vfio-helpers.h b/include/qemu/vfio-helpers.h
index ce7e7b057f..1f057c2b9e 100644
--- a/include/qemu/vfio-helpers.h
+++ b/include/qemu/vfio-helpers.h
@@ -12,7 +12,6 @@
 
 #ifndef QEMU_VFIO_HELPERS_H
 #define QEMU_VFIO_HELPERS_H
-#include "qemu/typedefs.h"
 
 typedef struct QEMUVFIOState QEMUVFIOState;
 
diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
index 89592ae4fa..d200ee01d0 100644
--- a/include/sysemu/whpx.h
+++ b/include/sysemu/whpx.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_WHPX_H
 #define QEMU_WHPX_H
 
-#include "config-host.h"
 #include "qemu-common.h"
 
 int whpx_init_vcpu(CPUState *cpu);
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 2395171acf..20b2d325d8 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -11,12 +11,13 @@
  *
  */
 
+#include "qemu/osdep.h"
+
 #include <linux/kvm.h>
 #include <linux/psp-sev.h>
 
 #include <sys/ioctl.h>
 
-#include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qom/object_interfaces.h"
 #include "qemu/base64.h"
diff --git a/target/i386/whp-dispatch.h b/target/i386/whp-dispatch.h
index d8d3485976..4ae3cc8fa5 100644
--- a/target/i386/whp-dispatch.h
+++ b/target/i386/whp-dispatch.h
@@ -1,5 +1,4 @@
 #include "windows.h"
-#include <stdbool.h>
 
 #include <WinHvPlatform.h>
 #include <WinHvEmulation.h>
diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
index fdb87d8d82..01b45ca0ae 100644
--- a/target/riscv/fpu_helper.c
+++ b/target/riscv/fpu_helper.c
@@ -17,7 +17,6 @@
  */
 
 #include "qemu/osdep.h"
-#include <stdlib.h>
 #include "cpu.h"
 #include "qemu/host-utils.h"
 #include "exec/exec-all.h"
diff --git a/tests/fp/platform.h b/tests/fp/platform.h
index c20ba70baa..f8c423dde3 100644
--- a/tests/fp/platform.h
+++ b/tests/fp/platform.h
@@ -29,7 +29,6 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "config-host.h"
 
 #ifndef HOST_WORDS_BIGENDIAN
 #define LITTLEENDIAN 1
diff --git a/tests/tpm-util.h b/tests/tpm-util.h
index 9e98bc5124..5755698ad2 100644
--- a/tests/tpm-util.h
+++ b/tests/tpm-util.h
@@ -13,7 +13,6 @@
 #ifndef TESTS_TPM_UTIL_H
 #define TESTS_TPM_UTIL_H
 
-#include "qemu/osdep.h"
 #include "io/channel-socket.h"
 
 typedef void (tx_func)(QTestState *s,
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 0cf8d0baca..0033b61f2e 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -29,8 +29,8 @@
 
 #define _FILE_OFFSET_BITS 64
 
-#include "qemu/atomic.h"
 #include "qemu/osdep.h"
+#include "qemu/atomic.h"
 #include "qemu/iov.h"
 #include "standard-headers/linux/virtio_net.h"
 #include "contrib/libvhost-user/libvhost-user.h"
diff --git a/util/qemu-thread-common.h b/util/qemu-thread-common.h
index a0ea7c0d92..2af6b12085 100644
--- a/util/qemu-thread-common.h
+++ b/util/qemu-thread-common.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_THREAD_COMMON_H
 #define QEMU_THREAD_COMMON_H
 
-#include "qemu/typedefs.h"
 #include "qemu/thread.h"
 #include "trace.h"
 
-- 
2.17.2



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

* Re: [Qemu-devel] [PATCH] Clean up includes
  2018-12-04 17:25 ` [Qemu-riscv] " Markus Armbruster
@ 2018-12-04 17:46   ` Eric Blake
  -1 siblings, 0 replies; 16+ messages in thread
From: Eric Blake @ 2018-12-04 17:46 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel
  Cc: Tony Krowiak, Palmer Dabbelt, qemu-riscv, Pierre Morel,
	Viktor Prutyanov, Bastian Koppelmann, Cornelia Huck, qemu-s390x,
	Yuval Shaia, Halil Pasic, Christian Borntraeger, Alex Williamson,
	Michael Clark, Alistair Francis, Sagar Karandikar, Paolo Bonzini,
	Eduardo Habkost, Stefan Berger, Richard Henderson

On 12/4/18 11:25 AM, Markus Armbruster wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>      contrib/libvhost-user/libvhost-user-glib.h
>      contrib/libvhost-user/libvhost-user.c
>      contrib/libvhost-user/libvhost-user.h

The script should probably auto-exclude contrib/ if none of those files 
make it into our final binary, and especially if they are meant to be 
compiled as stand-alone examples.

>      linux-user/mips64/cpu_loop.c
>      linux-user/mips64/signal.c
>      linux-user/sparc64/cpu_loop.c
>      linux-user/sparc64/signal.c
>      linux-user/x86_64/cpu_loop.c
>      linux-user/x86_64/signal.c
>      target/s390x/gen-features.c
>      tests/migration/s390x/a-b-bios.c
>      tests/test-rcu-simpleq.c
>      tests/test-rcu-tailq.c

Should any of these files be renamed *.c.inc to match their usage? 
(Presuming that you excluded them because they are pulled in via another 
.c file?)

> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   contrib/elf2dmp/pdb.h                     | 2 --
>   contrib/elf2dmp/pe.h                      | 1 -
>   contrib/elf2dmp/qemu_elf.h                | 1 -
>   contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
>   contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -

Hmm - my earlier question about auto-excluding contrib/ gets trickier. 
What's the rationale for including some files in here?

>   hw/rdma/rdma_utils.c                      | 1 +
>   hw/rdma/rdma_utils.h                      | 1 -
>   hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -
>   hw/vfio/ap.c                              | 2 +-
>   include/qemu/vfio-helpers.h               | 1 -
>   include/sysemu/whpx.h                     | 1 -
>   target/i386/sev.c                         | 3 ++-
>   target/i386/whp-dispatch.h                | 1 -
>   target/riscv/fpu_helper.c                 | 1 -
>   tests/fp/platform.h                       | 1 -
>   tests/tpm-util.h                          | 1 -
>   tests/vhost-user-bridge.c                 | 2 +-
>   util/qemu-thread-common.h                 | 1 -
>   18 files changed, 5 insertions(+), 18 deletions(-)

The remainder of these files look reasonable.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

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

* Re: [Qemu-riscv] [Qemu-devel] [PATCH] Clean up includes
@ 2018-12-04 17:46   ` Eric Blake
  0 siblings, 0 replies; 16+ messages in thread
From: Eric Blake @ 2018-12-04 17:46 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel
  Cc: Tony Krowiak, Palmer Dabbelt, qemu-riscv, Pierre Morel,
	Viktor Prutyanov, Bastian Koppelmann, Cornelia Huck, qemu-s390x,
	Yuval Shaia, Halil Pasic, Christian Borntraeger, Alex Williamson,
	Michael Clark, Alistair Francis, Sagar Karandikar, Paolo Bonzini,
	Eduardo Habkost, Stefan Berger, Richard Henderson

On 12/4/18 11:25 AM, Markus Armbruster wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>      contrib/libvhost-user/libvhost-user-glib.h
>      contrib/libvhost-user/libvhost-user.c
>      contrib/libvhost-user/libvhost-user.h

The script should probably auto-exclude contrib/ if none of those files 
make it into our final binary, and especially if they are meant to be 
compiled as stand-alone examples.

>      linux-user/mips64/cpu_loop.c
>      linux-user/mips64/signal.c
>      linux-user/sparc64/cpu_loop.c
>      linux-user/sparc64/signal.c
>      linux-user/x86_64/cpu_loop.c
>      linux-user/x86_64/signal.c
>      target/s390x/gen-features.c
>      tests/migration/s390x/a-b-bios.c
>      tests/test-rcu-simpleq.c
>      tests/test-rcu-tailq.c

Should any of these files be renamed *.c.inc to match their usage? 
(Presuming that you excluded them because they are pulled in via another 
.c file?)

> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   contrib/elf2dmp/pdb.h                     | 2 --
>   contrib/elf2dmp/pe.h                      | 1 -
>   contrib/elf2dmp/qemu_elf.h                | 1 -
>   contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
>   contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -

Hmm - my earlier question about auto-excluding contrib/ gets trickier. 
What's the rationale for including some files in here?

>   hw/rdma/rdma_utils.c                      | 1 +
>   hw/rdma/rdma_utils.h                      | 1 -
>   hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -
>   hw/vfio/ap.c                              | 2 +-
>   include/qemu/vfio-helpers.h               | 1 -
>   include/sysemu/whpx.h                     | 1 -
>   target/i386/sev.c                         | 3 ++-
>   target/i386/whp-dispatch.h                | 1 -
>   target/riscv/fpu_helper.c                 | 1 -
>   tests/fp/platform.h                       | 1 -
>   tests/tpm-util.h                          | 1 -
>   tests/vhost-user-bridge.c                 | 2 +-
>   util/qemu-thread-common.h                 | 1 -
>   18 files changed, 5 insertions(+), 18 deletions(-)

The remainder of these files look reasonable.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


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

* Re: [Qemu-devel] [PATCH] Clean up includes
  2018-12-04 17:25 ` [Qemu-riscv] " Markus Armbruster
@ 2018-12-04 18:43   ` Eduardo Habkost
  -1 siblings, 0 replies; 16+ messages in thread
From: Eduardo Habkost @ 2018-12-04 18:43 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Viktor Prutyanov, Yuval Shaia, Marcel Apfelbaum,
	Cornelia Huck, Alex Williamson, Christian Borntraeger,
	Tony Krowiak, Halil Pasic, Pierre Morel, Paolo Bonzini,
	Richard Henderson, Michael Clark, Palmer Dabbelt,
	Alistair Francis, Sagar Karandikar, Bastian Koppelmann,
	Stefan Berger, qemu-s390x, qemu-riscv

On Tue, Dec 04, 2018 at 06:25:35PM +0100, Markus Armbruster wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Acked-by: Eduardo Habkost <ehabkost@redhat.com>

-- 
Eduardo

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

* Re: [Qemu-riscv] [PATCH] Clean up includes
@ 2018-12-04 18:43   ` Eduardo Habkost
  0 siblings, 0 replies; 16+ messages in thread
From: Eduardo Habkost @ 2018-12-04 18:43 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Viktor Prutyanov, Yuval Shaia, Marcel Apfelbaum,
	Cornelia Huck, Alex Williamson, Christian Borntraeger,
	Tony Krowiak, Halil Pasic, Pierre Morel, Paolo Bonzini,
	Richard Henderson, Michael Clark, Palmer Dabbelt,
	Alistair Francis, Sagar Karandikar, Bastian Koppelmann,
	Stefan Berger, qemu-s390x, qemu-riscv

On Tue, Dec 04, 2018 at 06:25:35PM +0100, Markus Armbruster wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Acked-by: Eduardo Habkost <ehabkost@redhat.com>

-- 
Eduardo


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

* Re: [Qemu-devel] [PATCH] Clean up includes
  2018-12-04 17:46   ` [Qemu-riscv] " Eric Blake
@ 2018-12-05  8:07     ` Markus Armbruster
  -1 siblings, 0 replies; 16+ messages in thread
From: Markus Armbruster @ 2018-12-05  8:07 UTC (permalink / raw)
  To: Eric Blake
  Cc: qemu-devel, Tony Krowiak, Cornelia Huck, qemu-riscv,
	Pierre Morel, Viktor Prutyanov, Bastian Koppelmann,
	Richard Henderson, Palmer Dabbelt, Alex Williamson, Yuval Shaia,
	Halil Pasic, Christian Borntraeger, qemu-s390x, Michael Clark,
	Alistair Francis, Sagar Karandikar, Paolo Bonzini, Stefan Berger,
	Eduardo Habkost

Eric Blake <eblake@redhat.com> writes:

> On 12/4/18 11:25 AM, Markus Armbruster wrote:
>> Clean up includes so that osdep.h is included first and headers
>> which it implies are not included manually.
>>
>> This commit was created with scripts/clean-includes, with the changes
>> to the following files manually reverted:
>>
>>      contrib/libvhost-user/libvhost-user-glib.h
>>      contrib/libvhost-user/libvhost-user.c
>>      contrib/libvhost-user/libvhost-user.h
>
> The script should probably auto-exclude contrib/ if none of those
> files make it into our final binary, and especially if they are meant
> to be compiled as stand-alone examples.



>>      linux-user/mips64/cpu_loop.c
>>      linux-user/mips64/signal.c
>>      linux-user/sparc64/cpu_loop.c
>>      linux-user/sparc64/signal.c
>>      linux-user/x86_64/cpu_loop.c
>>      linux-user/x86_64/signal.c
>>      target/s390x/gen-features.c
>>      tests/migration/s390x/a-b-bios.c
>>      tests/test-rcu-simpleq.c
>>      tests/test-rcu-tailq.c
>
> Should any of these files be renamed *.c.inc to match their usage?
> (Presuming that you excluded them because they are pulled in via
> another .c file?)

The linux-user/T64/N.c contain nothing but

    #include "../T/N.c"

plus sometimes a #define T_TARGET_SINGAL_H thrown in to suppress
inclusion of a header.

Perhaps moving the actual meat into a common .inc.c would be cleaner.

Similarly, tests/test-rcu-simpleq.c contains nothing but

    #define TEST_LIST_TYPE 2
    #include "test-rcu-list.c"

and tests/test-rcu-tailq.c is the same with 3 instead of 2.

Again, we could move the actual meat into a common .inc.c.  But I'd
first investigate compiling the test three times with the appropriate
-DTEST_LIST_TYPE, using GNU Make's target-specific variable values.

target/s390x/gen-features.c is a standalone program that is compiled in
a way that breaks when we include osdep.h.  If that's fixable, fixing it
would be nice.  Aside: not sure I'd have written this in C.

tests/migration/s390x/ is a s390x guest firmware program for
migration-test.c.  It's compiled as a freestanding application.  I guess
osdep.h just gets in the way there.

All of the above is well beyond the scope of this simple cleanup patch.

>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>   contrib/elf2dmp/pdb.h                     | 2 --
>>   contrib/elf2dmp/pe.h                      | 1 -
>>   contrib/elf2dmp/qemu_elf.h                | 1 -
>>   contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
>>   contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -
>
> Hmm - my earlier question about auto-excluding contrib/ gets
> trickier. What's the rationale for including some files in here?

These are standalone programs that already include osdep.h.  My patch
simply drops superfluous include directives.

>>   hw/rdma/rdma_utils.c                      | 1 +
>>   hw/rdma/rdma_utils.h                      | 1 -
>>   hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -
>>   hw/vfio/ap.c                              | 2 +-
>>   include/qemu/vfio-helpers.h               | 1 -
>>   include/sysemu/whpx.h                     | 1 -
>>   target/i386/sev.c                         | 3 ++-
>>   target/i386/whp-dispatch.h                | 1 -
>>   target/riscv/fpu_helper.c                 | 1 -
>>   tests/fp/platform.h                       | 1 -
>>   tests/tpm-util.h                          | 1 -
>>   tests/vhost-user-bridge.c                 | 2 +-
>>   util/qemu-thread-common.h                 | 1 -
>>   18 files changed, 5 insertions(+), 18 deletions(-)
>
> The remainder of these files look reasonable.

Thanks!

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

* Re: [Qemu-riscv] [Qemu-devel] [PATCH] Clean up includes
@ 2018-12-05  8:07     ` Markus Armbruster
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Armbruster @ 2018-12-05  8:07 UTC (permalink / raw)
  To: Eric Blake
  Cc: qemu-devel, Tony Krowiak, Cornelia Huck, qemu-riscv,
	Pierre Morel, Viktor Prutyanov, Bastian Koppelmann,
	Richard Henderson, Palmer Dabbelt, Alex Williamson, Yuval Shaia,
	Halil Pasic, Christian Borntraeger, qemu-s390x, Michael Clark,
	Alistair Francis, Sagar Karandikar, Paolo Bonzini, Stefan Berger,
	Eduardo Habkost

Eric Blake <eblake@redhat.com> writes:

> On 12/4/18 11:25 AM, Markus Armbruster wrote:
>> Clean up includes so that osdep.h is included first and headers
>> which it implies are not included manually.
>>
>> This commit was created with scripts/clean-includes, with the changes
>> to the following files manually reverted:
>>
>>      contrib/libvhost-user/libvhost-user-glib.h
>>      contrib/libvhost-user/libvhost-user.c
>>      contrib/libvhost-user/libvhost-user.h
>
> The script should probably auto-exclude contrib/ if none of those
> files make it into our final binary, and especially if they are meant
> to be compiled as stand-alone examples.



>>      linux-user/mips64/cpu_loop.c
>>      linux-user/mips64/signal.c
>>      linux-user/sparc64/cpu_loop.c
>>      linux-user/sparc64/signal.c
>>      linux-user/x86_64/cpu_loop.c
>>      linux-user/x86_64/signal.c
>>      target/s390x/gen-features.c
>>      tests/migration/s390x/a-b-bios.c
>>      tests/test-rcu-simpleq.c
>>      tests/test-rcu-tailq.c
>
> Should any of these files be renamed *.c.inc to match their usage?
> (Presuming that you excluded them because they are pulled in via
> another .c file?)

The linux-user/T64/N.c contain nothing but

    #include "../T/N.c"

plus sometimes a #define T_TARGET_SINGAL_H thrown in to suppress
inclusion of a header.

Perhaps moving the actual meat into a common .inc.c would be cleaner.

Similarly, tests/test-rcu-simpleq.c contains nothing but

    #define TEST_LIST_TYPE 2
    #include "test-rcu-list.c"

and tests/test-rcu-tailq.c is the same with 3 instead of 2.

Again, we could move the actual meat into a common .inc.c.  But I'd
first investigate compiling the test three times with the appropriate
-DTEST_LIST_TYPE, using GNU Make's target-specific variable values.

target/s390x/gen-features.c is a standalone program that is compiled in
a way that breaks when we include osdep.h.  If that's fixable, fixing it
would be nice.  Aside: not sure I'd have written this in C.

tests/migration/s390x/ is a s390x guest firmware program for
migration-test.c.  It's compiled as a freestanding application.  I guess
osdep.h just gets in the way there.

All of the above is well beyond the scope of this simple cleanup patch.

>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>   contrib/elf2dmp/pdb.h                     | 2 --
>>   contrib/elf2dmp/pe.h                      | 1 -
>>   contrib/elf2dmp/qemu_elf.h                | 1 -
>>   contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
>>   contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -
>
> Hmm - my earlier question about auto-excluding contrib/ gets
> trickier. What's the rationale for including some files in here?

These are standalone programs that already include osdep.h.  My patch
simply drops superfluous include directives.

>>   hw/rdma/rdma_utils.c                      | 1 +
>>   hw/rdma/rdma_utils.h                      | 1 -
>>   hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -
>>   hw/vfio/ap.c                              | 2 +-
>>   include/qemu/vfio-helpers.h               | 1 -
>>   include/sysemu/whpx.h                     | 1 -
>>   target/i386/sev.c                         | 3 ++-
>>   target/i386/whp-dispatch.h                | 1 -
>>   target/riscv/fpu_helper.c                 | 1 -
>>   tests/fp/platform.h                       | 1 -
>>   tests/tpm-util.h                          | 1 -
>>   tests/vhost-user-bridge.c                 | 2 +-
>>   util/qemu-thread-common.h                 | 1 -
>>   18 files changed, 5 insertions(+), 18 deletions(-)
>
> The remainder of these files look reasonable.

Thanks!


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

* Re: [Qemu-devel] [qemu-s390x] [PATCH] Clean up includes
  2018-12-04 17:25 ` [Qemu-riscv] " Markus Armbruster
@ 2018-12-05  9:15   ` Halil Pasic
  -1 siblings, 0 replies; 16+ messages in thread
From: Halil Pasic @ 2018-12-05  9:15 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Tony Krowiak, Palmer Dabbelt, qemu-riscv,
	Pierre Morel, Viktor Prutyanov, Bastian Koppelmann,
	Cornelia Huck, qemu-s390x, Yuval Shaia, Christian Borntraeger,
	Alex Williamson, Michael Clark, Alistair Francis,
	Marcel Apfelbaum, Sagar Karandikar, Paolo Bonzini,
	Eduardo Habkost, Stefan Berger, Richard Henderson

On Tue,  4 Dec 2018 18:25:35 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Acked-by: Halil Pasic <pasic@linux.ibm.com>

Thanks,
Halil

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

* Re: [Qemu-riscv] [qemu-s390x] [PATCH] Clean up includes
@ 2018-12-05  9:15   ` Halil Pasic
  0 siblings, 0 replies; 16+ messages in thread
From: Halil Pasic @ 2018-12-05  9:15 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Tony Krowiak, Palmer Dabbelt, qemu-riscv,
	Pierre Morel, Viktor Prutyanov, Bastian Koppelmann,
	Cornelia Huck, qemu-s390x, Yuval Shaia, Christian Borntraeger,
	Alex Williamson, Michael Clark, Alistair Francis,
	Marcel Apfelbaum, Sagar Karandikar, Paolo Bonzini,
	Eduardo Habkost, Stefan Berger, Richard Henderson

On Tue,  4 Dec 2018 18:25:35 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Acked-by: Halil Pasic <pasic@linux.ibm.com>

Thanks,
Halil



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

* Re: [Qemu-devel] [PATCH] Clean up includes
  2018-12-04 17:25 ` [Qemu-riscv] " Markus Armbruster
@ 2018-12-05  9:51   ` Yuval Shaia
  -1 siblings, 0 replies; 16+ messages in thread
From: Yuval Shaia @ 2018-12-05  9:51 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Viktor Prutyanov, Marcel Apfelbaum, Cornelia Huck,
	Alex Williamson, Christian Borntraeger, Tony Krowiak,
	Halil Pasic, Pierre Morel, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Michael Clark, Palmer Dabbelt, Alistair Francis,
	Sagar Karandikar, Bastian Koppelmann, Stefan Berger, qemu-s390x,
	qemu-riscv, yuval.shaia

On Tue, Dec 04, 2018 at 06:25:35PM +0100, Markus Armbruster wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  contrib/elf2dmp/pdb.h                     | 2 --
>  contrib/elf2dmp/pe.h                      | 1 -
>  contrib/elf2dmp/qemu_elf.h                | 1 -
>  contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
>  contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -

For the rdma part:

>  hw/rdma/rdma_utils.c                      | 1 +
>  hw/rdma/rdma_utils.h                      | 1 -
>  hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -

Acked-by: Yuval Shaia <yuval.shaia@oracle.com>

Thanks.

>  hw/vfio/ap.c                              | 2 +-
>  include/qemu/vfio-helpers.h               | 1 -
>  include/sysemu/whpx.h                     | 1 -
>  target/i386/sev.c                         | 3 ++-
>  target/i386/whp-dispatch.h                | 1 -
>  target/riscv/fpu_helper.c                 | 1 -
>  tests/fp/platform.h                       | 1 -
>  tests/tpm-util.h                          | 1 -
>  tests/vhost-user-bridge.c                 | 2 +-
>  util/qemu-thread-common.h                 | 1 -
>  18 files changed, 5 insertions(+), 18 deletions(-)
> 
> diff --git a/contrib/elf2dmp/pdb.h b/contrib/elf2dmp/pdb.h
> index 4351a2dd61..a3a3cac2c1 100644
> --- a/contrib/elf2dmp/pdb.h
> +++ b/contrib/elf2dmp/pdb.h
> @@ -8,8 +8,6 @@
>  #ifndef PDB_H
>  #define PDB_H
>  
> -#include <stdint.h>
> -#include <stdlib.h>
>  
>  typedef struct GUID {
>      unsigned int Data1;
> diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h
> index 374e06a9c5..dafb26afbb 100644
> --- a/contrib/elf2dmp/pe.h
> +++ b/contrib/elf2dmp/pe.h
> @@ -8,7 +8,6 @@
>  #ifndef PE_H
>  #define PE_H
>  
> -#include <stdint.h>
>  
>  typedef struct IMAGE_DOS_HEADER {
>      uint16_t  e_magic;      /* 0x00: MZ Header signature */
> diff --git a/contrib/elf2dmp/qemu_elf.h b/contrib/elf2dmp/qemu_elf.h
> index d85d6558fa..86e6e688fb 100644
> --- a/contrib/elf2dmp/qemu_elf.h
> +++ b/contrib/elf2dmp/qemu_elf.h
> @@ -8,7 +8,6 @@
>  #ifndef QEMU_ELF_H
>  #define QEMU_ELF_H
>  
> -#include <stdint.h>
>  #include <elf.h>
>  
>  typedef struct QEMUCPUSegment {
> diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
> index 571f114a56..858221ad95 100644
> --- a/contrib/vhost-user-blk/vhost-user-blk.c
> +++ b/contrib/vhost-user-blk/vhost-user-blk.c
> @@ -20,7 +20,6 @@
>  #include "contrib/libvhost-user/libvhost-user-glib.h"
>  #include "contrib/libvhost-user/libvhost-user.h"
>  
> -#include <glib.h>
>  
>  struct virtio_blk_inhdr {
>      unsigned char status;
> diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
> index 02c29019d1..496dd6e693 100644
> --- a/contrib/vhost-user-scsi/vhost-user-scsi.c
> +++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
> @@ -16,7 +16,6 @@
>  #include "contrib/libvhost-user/libvhost-user-glib.h"
>  #include "standard-headers/linux/virtio_scsi.h"
>  
> -#include <glib.h>
>  
>  #define VUS_ISCSI_INITIATOR "iqn.2016-11.com.nutanix:vhost-user-scsi"
>  
> diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_utils.c
> index dc23f158f3..4fbea8cde2 100644
> --- a/hw/rdma/rdma_utils.c
> +++ b/hw/rdma/rdma_utils.c
> @@ -13,6 +13,7 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
>  #include "rdma_utils.h"
>  
>  #ifdef PVRDMA_DEBUG
> diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h
> index 04c7c2ef5b..c4f96c4f2a 100644
> --- a/hw/rdma/rdma_utils.h
> +++ b/hw/rdma/rdma_utils.h
> @@ -17,7 +17,6 @@
>  #ifndef RDMA_UTILS_H
>  #define RDMA_UTILS_H
>  
> -#include "qemu/osdep.h"
>  #include "hw/pci/pci.h"
>  #include "sysemu/dma.h"
>  
> diff --git a/hw/rdma/vmw/pvrdma_dev_ring.h b/hw/rdma/vmw/pvrdma_dev_ring.h
> index 411d244603..5f2a0cf9b9 100644
> --- a/hw/rdma/vmw/pvrdma_dev_ring.h
> +++ b/hw/rdma/vmw/pvrdma_dev_ring.h
> @@ -16,7 +16,6 @@
>  #ifndef PVRDMA_DEV_RING_H
>  #define PVRDMA_DEV_RING_H
>  
> -#include "qemu/typedefs.h"
>  
>  #define MAX_RING_NAME_SZ 32
>  
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index 65de952f44..32b880213d 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -10,9 +10,9 @@
>   * directory.
>   */
>  
> +#include "qemu/osdep.h"
>  #include <linux/vfio.h>
>  #include <sys/ioctl.h>
> -#include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "hw/sysbus.h"
>  #include "hw/vfio/vfio.h"
> diff --git a/include/qemu/vfio-helpers.h b/include/qemu/vfio-helpers.h
> index ce7e7b057f..1f057c2b9e 100644
> --- a/include/qemu/vfio-helpers.h
> +++ b/include/qemu/vfio-helpers.h
> @@ -12,7 +12,6 @@
>  
>  #ifndef QEMU_VFIO_HELPERS_H
>  #define QEMU_VFIO_HELPERS_H
> -#include "qemu/typedefs.h"
>  
>  typedef struct QEMUVFIOState QEMUVFIOState;
>  
> diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
> index 89592ae4fa..d200ee01d0 100644
> --- a/include/sysemu/whpx.h
> +++ b/include/sysemu/whpx.h
> @@ -13,7 +13,6 @@
>  #ifndef QEMU_WHPX_H
>  #define QEMU_WHPX_H
>  
> -#include "config-host.h"
>  #include "qemu-common.h"
>  
>  int whpx_init_vcpu(CPUState *cpu);
> diff --git a/target/i386/sev.c b/target/i386/sev.c
> index 2395171acf..20b2d325d8 100644
> --- a/target/i386/sev.c
> +++ b/target/i386/sev.c
> @@ -11,12 +11,13 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
> +
>  #include <linux/kvm.h>
>  #include <linux/psp-sev.h>
>  
>  #include <sys/ioctl.h>
>  
> -#include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qom/object_interfaces.h"
>  #include "qemu/base64.h"
> diff --git a/target/i386/whp-dispatch.h b/target/i386/whp-dispatch.h
> index d8d3485976..4ae3cc8fa5 100644
> --- a/target/i386/whp-dispatch.h
> +++ b/target/i386/whp-dispatch.h
> @@ -1,5 +1,4 @@
>  #include "windows.h"
> -#include <stdbool.h>
>  
>  #include <WinHvPlatform.h>
>  #include <WinHvEmulation.h>
> diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index fdb87d8d82..01b45ca0ae 100644
> --- a/target/riscv/fpu_helper.c
> +++ b/target/riscv/fpu_helper.c
> @@ -17,7 +17,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include <stdlib.h>
>  #include "cpu.h"
>  #include "qemu/host-utils.h"
>  #include "exec/exec-all.h"
> diff --git a/tests/fp/platform.h b/tests/fp/platform.h
> index c20ba70baa..f8c423dde3 100644
> --- a/tests/fp/platform.h
> +++ b/tests/fp/platform.h
> @@ -29,7 +29,6 @@
>   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
>   * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   */
> -#include "config-host.h"
>  
>  #ifndef HOST_WORDS_BIGENDIAN
>  #define LITTLEENDIAN 1
> diff --git a/tests/tpm-util.h b/tests/tpm-util.h
> index 9e98bc5124..5755698ad2 100644
> --- a/tests/tpm-util.h
> +++ b/tests/tpm-util.h
> @@ -13,7 +13,6 @@
>  #ifndef TESTS_TPM_UTIL_H
>  #define TESTS_TPM_UTIL_H
>  
> -#include "qemu/osdep.h"
>  #include "io/channel-socket.h"
>  
>  typedef void (tx_func)(QTestState *s,
> diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
> index 0cf8d0baca..0033b61f2e 100644
> --- a/tests/vhost-user-bridge.c
> +++ b/tests/vhost-user-bridge.c
> @@ -29,8 +29,8 @@
>  
>  #define _FILE_OFFSET_BITS 64
>  
> -#include "qemu/atomic.h"
>  #include "qemu/osdep.h"
> +#include "qemu/atomic.h"
>  #include "qemu/iov.h"
>  #include "standard-headers/linux/virtio_net.h"
>  #include "contrib/libvhost-user/libvhost-user.h"
> diff --git a/util/qemu-thread-common.h b/util/qemu-thread-common.h
> index a0ea7c0d92..2af6b12085 100644
> --- a/util/qemu-thread-common.h
> +++ b/util/qemu-thread-common.h
> @@ -13,7 +13,6 @@
>  #ifndef QEMU_THREAD_COMMON_H
>  #define QEMU_THREAD_COMMON_H
>  
> -#include "qemu/typedefs.h"
>  #include "qemu/thread.h"
>  #include "trace.h"
>  
> -- 
> 2.17.2
> 

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

* Re: [Qemu-riscv] [PATCH] Clean up includes
@ 2018-12-05  9:51   ` Yuval Shaia
  0 siblings, 0 replies; 16+ messages in thread
From: Yuval Shaia @ 2018-12-05  9:51 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Viktor Prutyanov, Marcel Apfelbaum, Cornelia Huck,
	Alex Williamson, Christian Borntraeger, Tony Krowiak,
	Halil Pasic, Pierre Morel, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Michael Clark, Palmer Dabbelt, Alistair Francis,
	Sagar Karandikar, Bastian Koppelmann, Stefan Berger, qemu-s390x,
	qemu-riscv, yuval.shaia

On Tue, Dec 04, 2018 at 06:25:35PM +0100, Markus Armbruster wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  contrib/elf2dmp/pdb.h                     | 2 --
>  contrib/elf2dmp/pe.h                      | 1 -
>  contrib/elf2dmp/qemu_elf.h                | 1 -
>  contrib/vhost-user-blk/vhost-user-blk.c   | 1 -
>  contrib/vhost-user-scsi/vhost-user-scsi.c | 1 -

For the rdma part:

>  hw/rdma/rdma_utils.c                      | 1 +
>  hw/rdma/rdma_utils.h                      | 1 -
>  hw/rdma/vmw/pvrdma_dev_ring.h             | 1 -

Acked-by: Yuval Shaia <yuval.shaia@oracle.com>

Thanks.

>  hw/vfio/ap.c                              | 2 +-
>  include/qemu/vfio-helpers.h               | 1 -
>  include/sysemu/whpx.h                     | 1 -
>  target/i386/sev.c                         | 3 ++-
>  target/i386/whp-dispatch.h                | 1 -
>  target/riscv/fpu_helper.c                 | 1 -
>  tests/fp/platform.h                       | 1 -
>  tests/tpm-util.h                          | 1 -
>  tests/vhost-user-bridge.c                 | 2 +-
>  util/qemu-thread-common.h                 | 1 -
>  18 files changed, 5 insertions(+), 18 deletions(-)
> 
> diff --git a/contrib/elf2dmp/pdb.h b/contrib/elf2dmp/pdb.h
> index 4351a2dd61..a3a3cac2c1 100644
> --- a/contrib/elf2dmp/pdb.h
> +++ b/contrib/elf2dmp/pdb.h
> @@ -8,8 +8,6 @@
>  #ifndef PDB_H
>  #define PDB_H
>  
> -#include <stdint.h>
> -#include <stdlib.h>
>  
>  typedef struct GUID {
>      unsigned int Data1;
> diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h
> index 374e06a9c5..dafb26afbb 100644
> --- a/contrib/elf2dmp/pe.h
> +++ b/contrib/elf2dmp/pe.h
> @@ -8,7 +8,6 @@
>  #ifndef PE_H
>  #define PE_H
>  
> -#include <stdint.h>
>  
>  typedef struct IMAGE_DOS_HEADER {
>      uint16_t  e_magic;      /* 0x00: MZ Header signature */
> diff --git a/contrib/elf2dmp/qemu_elf.h b/contrib/elf2dmp/qemu_elf.h
> index d85d6558fa..86e6e688fb 100644
> --- a/contrib/elf2dmp/qemu_elf.h
> +++ b/contrib/elf2dmp/qemu_elf.h
> @@ -8,7 +8,6 @@
>  #ifndef QEMU_ELF_H
>  #define QEMU_ELF_H
>  
> -#include <stdint.h>
>  #include <elf.h>
>  
>  typedef struct QEMUCPUSegment {
> diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
> index 571f114a56..858221ad95 100644
> --- a/contrib/vhost-user-blk/vhost-user-blk.c
> +++ b/contrib/vhost-user-blk/vhost-user-blk.c
> @@ -20,7 +20,6 @@
>  #include "contrib/libvhost-user/libvhost-user-glib.h"
>  #include "contrib/libvhost-user/libvhost-user.h"
>  
> -#include <glib.h>
>  
>  struct virtio_blk_inhdr {
>      unsigned char status;
> diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
> index 02c29019d1..496dd6e693 100644
> --- a/contrib/vhost-user-scsi/vhost-user-scsi.c
> +++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
> @@ -16,7 +16,6 @@
>  #include "contrib/libvhost-user/libvhost-user-glib.h"
>  #include "standard-headers/linux/virtio_scsi.h"
>  
> -#include <glib.h>
>  
>  #define VUS_ISCSI_INITIATOR "iqn.2016-11.com.nutanix:vhost-user-scsi"
>  
> diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_utils.c
> index dc23f158f3..4fbea8cde2 100644
> --- a/hw/rdma/rdma_utils.c
> +++ b/hw/rdma/rdma_utils.c
> @@ -13,6 +13,7 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
>  #include "rdma_utils.h"
>  
>  #ifdef PVRDMA_DEBUG
> diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h
> index 04c7c2ef5b..c4f96c4f2a 100644
> --- a/hw/rdma/rdma_utils.h
> +++ b/hw/rdma/rdma_utils.h
> @@ -17,7 +17,6 @@
>  #ifndef RDMA_UTILS_H
>  #define RDMA_UTILS_H
>  
> -#include "qemu/osdep.h"
>  #include "hw/pci/pci.h"
>  #include "sysemu/dma.h"
>  
> diff --git a/hw/rdma/vmw/pvrdma_dev_ring.h b/hw/rdma/vmw/pvrdma_dev_ring.h
> index 411d244603..5f2a0cf9b9 100644
> --- a/hw/rdma/vmw/pvrdma_dev_ring.h
> +++ b/hw/rdma/vmw/pvrdma_dev_ring.h
> @@ -16,7 +16,6 @@
>  #ifndef PVRDMA_DEV_RING_H
>  #define PVRDMA_DEV_RING_H
>  
> -#include "qemu/typedefs.h"
>  
>  #define MAX_RING_NAME_SZ 32
>  
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index 65de952f44..32b880213d 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -10,9 +10,9 @@
>   * directory.
>   */
>  
> +#include "qemu/osdep.h"
>  #include <linux/vfio.h>
>  #include <sys/ioctl.h>
> -#include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "hw/sysbus.h"
>  #include "hw/vfio/vfio.h"
> diff --git a/include/qemu/vfio-helpers.h b/include/qemu/vfio-helpers.h
> index ce7e7b057f..1f057c2b9e 100644
> --- a/include/qemu/vfio-helpers.h
> +++ b/include/qemu/vfio-helpers.h
> @@ -12,7 +12,6 @@
>  
>  #ifndef QEMU_VFIO_HELPERS_H
>  #define QEMU_VFIO_HELPERS_H
> -#include "qemu/typedefs.h"
>  
>  typedef struct QEMUVFIOState QEMUVFIOState;
>  
> diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
> index 89592ae4fa..d200ee01d0 100644
> --- a/include/sysemu/whpx.h
> +++ b/include/sysemu/whpx.h
> @@ -13,7 +13,6 @@
>  #ifndef QEMU_WHPX_H
>  #define QEMU_WHPX_H
>  
> -#include "config-host.h"
>  #include "qemu-common.h"
>  
>  int whpx_init_vcpu(CPUState *cpu);
> diff --git a/target/i386/sev.c b/target/i386/sev.c
> index 2395171acf..20b2d325d8 100644
> --- a/target/i386/sev.c
> +++ b/target/i386/sev.c
> @@ -11,12 +11,13 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
> +
>  #include <linux/kvm.h>
>  #include <linux/psp-sev.h>
>  
>  #include <sys/ioctl.h>
>  
> -#include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qom/object_interfaces.h"
>  #include "qemu/base64.h"
> diff --git a/target/i386/whp-dispatch.h b/target/i386/whp-dispatch.h
> index d8d3485976..4ae3cc8fa5 100644
> --- a/target/i386/whp-dispatch.h
> +++ b/target/i386/whp-dispatch.h
> @@ -1,5 +1,4 @@
>  #include "windows.h"
> -#include <stdbool.h>
>  
>  #include <WinHvPlatform.h>
>  #include <WinHvEmulation.h>
> diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c
> index fdb87d8d82..01b45ca0ae 100644
> --- a/target/riscv/fpu_helper.c
> +++ b/target/riscv/fpu_helper.c
> @@ -17,7 +17,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include <stdlib.h>
>  #include "cpu.h"
>  #include "qemu/host-utils.h"
>  #include "exec/exec-all.h"
> diff --git a/tests/fp/platform.h b/tests/fp/platform.h
> index c20ba70baa..f8c423dde3 100644
> --- a/tests/fp/platform.h
> +++ b/tests/fp/platform.h
> @@ -29,7 +29,6 @@
>   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
>   * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>   */
> -#include "config-host.h"
>  
>  #ifndef HOST_WORDS_BIGENDIAN
>  #define LITTLEENDIAN 1
> diff --git a/tests/tpm-util.h b/tests/tpm-util.h
> index 9e98bc5124..5755698ad2 100644
> --- a/tests/tpm-util.h
> +++ b/tests/tpm-util.h
> @@ -13,7 +13,6 @@
>  #ifndef TESTS_TPM_UTIL_H
>  #define TESTS_TPM_UTIL_H
>  
> -#include "qemu/osdep.h"
>  #include "io/channel-socket.h"
>  
>  typedef void (tx_func)(QTestState *s,
> diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
> index 0cf8d0baca..0033b61f2e 100644
> --- a/tests/vhost-user-bridge.c
> +++ b/tests/vhost-user-bridge.c
> @@ -29,8 +29,8 @@
>  
>  #define _FILE_OFFSET_BITS 64
>  
> -#include "qemu/atomic.h"
>  #include "qemu/osdep.h"
> +#include "qemu/atomic.h"
>  #include "qemu/iov.h"
>  #include "standard-headers/linux/virtio_net.h"
>  #include "contrib/libvhost-user/libvhost-user.h"
> diff --git a/util/qemu-thread-common.h b/util/qemu-thread-common.h
> index a0ea7c0d92..2af6b12085 100644
> --- a/util/qemu-thread-common.h
> +++ b/util/qemu-thread-common.h
> @@ -13,7 +13,6 @@
>  #ifndef QEMU_THREAD_COMMON_H
>  #define QEMU_THREAD_COMMON_H
>  
> -#include "qemu/typedefs.h"
>  #include "qemu/thread.h"
>  #include "trace.h"
>  
> -- 
> 2.17.2
> 


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

* Re: [Qemu-devel] [PATCH] Clean up includes
  2018-12-05  8:07     ` [Qemu-riscv] " Markus Armbruster
@ 2018-12-05 10:45       ` Cornelia Huck
  -1 siblings, 0 replies; 16+ messages in thread
From: Cornelia Huck @ 2018-12-05 10:45 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Eric Blake, qemu-devel, Tony Krowiak, qemu-riscv, Pierre Morel,
	Viktor Prutyanov, Bastian Koppelmann, Richard Henderson,
	Palmer Dabbelt, Alex Williamson, Yuval Shaia, Halil Pasic,
	Christian Borntraeger, qemu-s390x, Michael Clark,
	Alistair Francis, Sagar Karandikar, Paolo Bonzini, Stefan Berger,
	Eduardo Habkost

On Wed, 05 Dec 2018 09:07:13 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> > On 12/4/18 11:25 AM, Markus Armbruster wrote:  
> >> Clean up includes so that osdep.h is included first and headers
> >> which it implies are not included manually.
> >>
> >> This commit was created with scripts/clean-includes, with the changes
> >> to the following files manually reverted:

(...)

> >>      target/s390x/gen-features.c

(..)

> target/s390x/gen-features.c is a standalone program that is compiled in
> a way that breaks when we include osdep.h.  If that's fixable, fixing it
> would be nice.  Aside: not sure I'd have written this in C.

Yes, that file is a bit of an oddball. Might make sense to add a
comment there that it is standalone, so you can find that out without
looking at the Makefile. I don't think rewriting this to something else
is worth the effort.

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

* Re: [Qemu-riscv] [Qemu-devel] [PATCH] Clean up includes
@ 2018-12-05 10:45       ` Cornelia Huck
  0 siblings, 0 replies; 16+ messages in thread
From: Cornelia Huck @ 2018-12-05 10:45 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Eric Blake, qemu-devel, Tony Krowiak, qemu-riscv, Pierre Morel,
	Viktor Prutyanov, Bastian Koppelmann, Richard Henderson,
	Palmer Dabbelt, Alex Williamson, Yuval Shaia, Halil Pasic,
	Christian Borntraeger, qemu-s390x, Michael Clark,
	Alistair Francis, Sagar Karandikar, Paolo Bonzini, Stefan Berger,
	Eduardo Habkost

On Wed, 05 Dec 2018 09:07:13 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> > On 12/4/18 11:25 AM, Markus Armbruster wrote:  
> >> Clean up includes so that osdep.h is included first and headers
> >> which it implies are not included manually.
> >>
> >> This commit was created with scripts/clean-includes, with the changes
> >> to the following files manually reverted:

(...)

> >>      target/s390x/gen-features.c

(..)

> target/s390x/gen-features.c is a standalone program that is compiled in
> a way that breaks when we include osdep.h.  If that's fixable, fixing it
> would be nice.  Aside: not sure I'd have written this in C.

Yes, that file is a bit of an oddball. Might make sense to add a
comment there that it is standalone, so you can find that out without
looking at the Makefile. I don't think rewriting this to something else
is worth the effort.


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

* Re: [Qemu-devel] [PATCH] Clean up includes
  2018-12-04 17:25 ` [Qemu-riscv] " Markus Armbruster
@ 2018-12-05 10:47   ` Viktor Prutyanov
  -1 siblings, 0 replies; 16+ messages in thread
From: Viktor Prutyanov @ 2018-12-05 10:47 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Yuval Shaia, Marcel Apfelbaum, Cornelia Huck,
	Alex Williamson, Christian Borntraeger, Tony Krowiak,
	Halil Pasic, Pierre Morel, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Michael Clark, Palmer Dabbelt, Alistair Francis,
	Sagar Karandikar, Bastian Koppelmann, Stefan Berger, qemu-s390x,
	qemu-riscv

On Tue,  4 Dec 2018 18:25:35 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---

For the elf2dmp:

>  contrib/elf2dmp/pdb.h                     | 2 --
>  contrib/elf2dmp/pe.h                      | 1 -
>  contrib/elf2dmp/qemu_elf.h                | 1 -

Acked-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>

-- 
Viktor Prutyanov

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

* Re: [Qemu-riscv] [PATCH] Clean up includes
@ 2018-12-05 10:47   ` Viktor Prutyanov
  0 siblings, 0 replies; 16+ messages in thread
From: Viktor Prutyanov @ 2018-12-05 10:47 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: qemu-devel, Yuval Shaia, Marcel Apfelbaum, Cornelia Huck,
	Alex Williamson, Christian Borntraeger, Tony Krowiak,
	Halil Pasic, Pierre Morel, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, Michael Clark, Palmer Dabbelt, Alistair Francis,
	Sagar Karandikar, Bastian Koppelmann, Stefan Berger, qemu-s390x,
	qemu-riscv

On Tue,  4 Dec 2018 18:25:35 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes, with the changes
> to the following files manually reverted:
> 
>     contrib/libvhost-user/libvhost-user-glib.h
>     contrib/libvhost-user/libvhost-user.c
>     contrib/libvhost-user/libvhost-user.h
>     linux-user/mips64/cpu_loop.c
>     linux-user/mips64/signal.c
>     linux-user/sparc64/cpu_loop.c
>     linux-user/sparc64/signal.c
>     linux-user/x86_64/cpu_loop.c
>     linux-user/x86_64/signal.c
>     target/s390x/gen-features.c
>     tests/migration/s390x/a-b-bios.c
>     tests/test-rcu-simpleq.c
>     tests/test-rcu-tailq.c
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---

For the elf2dmp:

>  contrib/elf2dmp/pdb.h                     | 2 --
>  contrib/elf2dmp/pe.h                      | 1 -
>  contrib/elf2dmp/qemu_elf.h                | 1 -

Acked-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>

-- 
Viktor Prutyanov


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

end of thread, other threads:[~2018-12-05 13:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 17:25 [Qemu-devel] [PATCH] Clean up includes Markus Armbruster
2018-12-04 17:25 ` [Qemu-riscv] " Markus Armbruster
2018-12-04 17:46 ` [Qemu-devel] " Eric Blake
2018-12-04 17:46   ` [Qemu-riscv] " Eric Blake
2018-12-05  8:07   ` Markus Armbruster
2018-12-05  8:07     ` [Qemu-riscv] " Markus Armbruster
2018-12-05 10:45     ` Cornelia Huck
2018-12-05 10:45       ` [Qemu-riscv] " Cornelia Huck
2018-12-04 18:43 ` Eduardo Habkost
2018-12-04 18:43   ` [Qemu-riscv] " Eduardo Habkost
2018-12-05  9:15 ` [Qemu-devel] [qemu-s390x] " Halil Pasic
2018-12-05  9:15   ` [Qemu-riscv] " Halil Pasic
2018-12-05  9:51 ` [Qemu-devel] " Yuval Shaia
2018-12-05  9:51   ` [Qemu-riscv] " Yuval Shaia
2018-12-05 10:47 ` [Qemu-devel] " Viktor Prutyanov
2018-12-05 10:47   ` [Qemu-riscv] " Viktor Prutyanov

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.