All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, pbonzini@redhat.com,
	kwolf@redhat.com, hreitz@redhat.com, imp@bsdimp.com,
	kevans@freebsd.org, berrange@redhat.com, groug@kaod.org,
	qemu_oss@crudebyte.com, mst@redhat.com, philmd@linaro.org,
	peter.maydell@linaro.org, alistair@alistair23.me,
	jasowang@redhat.com, jonathan.cameron@huawei.com,
	kbastian@mail.uni-paderborn.de, quintela@redhat.com,
	dgilbert@redhat.com, michael.roth@amd.com, kkostiuk@redhat.com,
	tsimpson@quicinc.com, palmer@dabbelt.com, bin.meng@windriver.com,
	qemu-block@nongnu.org, qemu-arm@nongnu.org,
	qemu-riscv@nongnu.org
Subject: [PATCH v6 00/20] Clean up includes
Date: Thu,  2 Feb 2023 14:38:10 +0100	[thread overview]
Message-ID: <20230202133830.2152150-1-armbru@redhat.com> (raw)

Back in 2016, we discussed[1] rules for headers, and these were
generally liked:

1. Have a carefully curated header that's included everywhere first.  We
   got that already thanks to Peter: osdep.h.

2. Headers should normally include everything they need beyond osdep.h.
   If exceptions are needed for some reason, they must be documented in
   the header.  If all that's needed from a header is typedefs, put
   those into qemu/typedefs.h instead of including the header.

3. Cyclic inclusion is forbidden.

This series fixes violations of rule 2.  I may have split patches too
aggressively.  Let me know if you want some squashed together.

v6:
* PATCH 04: Commit message generated by script improved [Juan]
* PATCH 05-16: Commit messages updated for PATCH 04

v5:
* PATCH 01+02: Commit message Fixes: format adjusted [Michael]
* PATCH 04: New [David]
* PATCH 05-16: Commit messages updated for PATCH 04

v4:
* PATCH 01-03: New
* PATCH 04-15: Previous version redone with scripts/clean-includes,
  	       result split up for review
* PATCH 16-19: New

v3:
* Rebased, old PATCH 1+2+4 are in master as commit
  881e019770..f07ceffdf5
* PATCH 1: Fix bsd-user

v2:
* Rebased
* PATCH 3: v1 posted separately
* PATCH 4: New

[1] Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
    https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html

Markus Armbruster (20):
  scripts/clean-includes: Fully skip / ignore files
  scripts/clean-includes: Don't claim duplicate headers found when not
  scripts/clean-includes: Skip symbolic links
  scripts/clean-includes: Improve --git commit message
  bsd-user: Clean up includes
  crypto: Clean up includes
  hw/cxl: Clean up includes
  hw/input: Clean up includes
  hw/tricore: Clean up includes
  qga: Clean up includes
  migration: Clean up includes
  net: Clean up includes
  target/hexagon: Clean up includes
  riscv: Clean up includes
  block: Clean up includes
  accel: Clean up includes
  Fix non-first inclusions of qemu/osdep.h
  Don't include headers already included by qemu/osdep.h
  9p: Drop superfluous include of linux/limits.h
  Drop duplicate #include

Markus Armbruster (20):
  scripts/clean-includes: Fully skip / ignore files
  scripts/clean-includes: Don't claim duplicate headers found when not
  scripts/clean-includes: Skip symbolic links
  scripts/clean-includes: Improve --git commit message
  bsd-user: Clean up includes
  crypto: Clean up includes
  hw/cxl: Clean up includes
  hw/input: Clean up includes
  hw/tricore: Clean up includes
  qga: Clean up includes
  migration: Clean up includes
  net: Clean up includes
  target/hexagon: Clean up includes
  riscv: Clean up includes
  block: Clean up includes
  accel: Clean up includes
  Fix non-first inclusions of qemu/osdep.h
  Don't include headers already included by qemu/osdep.h
  9p: Drop superfluous include of linux/limits.h
  Drop duplicate #include

 backends/tpm/tpm_ioctl.h          |  2 --
 bsd-user/bsd-proc.h               |  4 ----
 bsd-user/qemu.h                   |  1 -
 crypto/block-luks-priv.h          |  1 -
 fsdev/p9array.h                   |  2 --
 include/block/graph-lock.h        |  1 -
 include/block/write-threshold.h   |  2 --
 include/hw/arm/fsl-imx6ul.h       |  1 -
 include/hw/arm/fsl-imx7.h         |  1 -
 include/hw/cxl/cxl_component.h    |  2 --
 include/hw/cxl/cxl_host.h         |  1 -
 include/hw/cxl/cxl_pci.h          |  1 -
 include/hw/input/pl050.h          |  1 -
 include/hw/misc/aspeed_lpc.h      |  2 --
 include/hw/pci/pcie_doe.h         |  1 -
 include/hw/tricore/triboard.h     |  1 -
 include/qemu/async-teardown.h     |  2 --
 include/qemu/dbus.h               |  1 -
 include/qemu/host-utils.h         |  1 -
 include/qemu/userfaultfd.h        |  1 -
 include/sysemu/accel-blocker.h    |  1 -
 include/sysemu/event-loop-base.h  |  1 -
 net/vmnet_int.h                   |  1 -
 qga/cutils.h                      |  2 --
 target/hexagon/hex_arch_types.h   |  1 -
 target/hexagon/mmvec/macros.h     |  1 -
 target/riscv/pmu.h                |  1 -
 accel/tcg/cpu-exec.c              |  1 -
 audio/sndioaudio.c                |  2 +-
 backends/hostmem-epc.c            |  2 +-
 backends/tpm/tpm_emulator.c       |  1 -
 block/export/vduse-blk.c          |  2 +-
 block/qapi.c                      |  1 -
 bsd-user/arm/signal.c             |  1 +
 bsd-user/arm/target_arch_cpu.c    |  2 ++
 bsd-user/freebsd/os-sys.c         |  1 +
 bsd-user/i386/signal.c            |  1 +
 bsd-user/i386/target_arch_cpu.c   |  3 +--
 bsd-user/main.c                   |  4 +---
 bsd-user/strace.c                 |  1 -
 bsd-user/x86_64/signal.c          |  1 +
 bsd-user/x86_64/target_arch_cpu.c |  3 +--
 hw/9pfs/9p.c                      |  5 -----
 hw/acpi/piix4.c                   |  1 -
 hw/alpha/dp264.c                  |  1 -
 hw/arm/virt.c                     |  1 -
 hw/arm/xlnx-versal.c              |  1 -
 hw/block/pflash_cfi01.c           |  1 -
 hw/core/machine.c                 |  1 -
 hw/display/virtio-gpu-udmabuf.c   |  1 -
 hw/hppa/machine.c                 |  1 -
 hw/hyperv/syndbg.c                |  2 +-
 hw/i2c/pmbus_device.c             |  1 -
 hw/i386/acpi-build.c              |  1 -
 hw/input/tsc210x.c                |  1 -
 hw/loongarch/acpi-build.c         |  1 -
 hw/misc/macio/cuda.c              |  1 -
 hw/misc/macio/pmu.c               |  1 -
 hw/net/xilinx_axienet.c           |  1 -
 hw/ppc/ppc405_uc.c                |  2 --
 hw/ppc/ppc440_bamboo.c            |  1 -
 hw/ppc/spapr_drc.c                |  1 -
 hw/rdma/vmw/pvrdma_dev_ring.c     |  1 -
 hw/remote/machine.c               |  1 -
 hw/remote/proxy-memory-listener.c |  1 -
 hw/remote/remote-obj.c            |  1 -
 hw/rtc/mc146818rtc.c              |  1 -
 hw/s390x/virtio-ccw-serial.c      |  1 -
 hw/sensor/adm1272.c               |  1 -
 hw/usb/dev-storage-bot.c          |  1 -
 hw/usb/dev-storage-classic.c      |  1 -
 migration/postcopy-ram.c          |  2 --
 qga/commands-posix.c              |  1 -
 qga/cutils.c                      |  3 ++-
 softmmu/dirtylimit.c              |  1 -
 softmmu/runstate.c                |  1 -
 softmmu/vl.c                      |  3 ---
 target/loongarch/translate.c      |  1 -
 target/mips/tcg/translate.c       |  1 -
 target/nios2/translate.c          |  2 --
 tcg/tci.c                         |  1 -
 tests/unit/test-cutils.c          |  1 -
 tests/unit/test-seccomp.c         |  1 -
 ui/gtk.c                          |  1 -
 ui/udmabuf.c                      |  1 -
 util/async-teardown.c             | 12 ++++--------
 util/main-loop.c                  |  1 -
 util/oslib-posix.c                |  6 ------
 scripts/clean-includes            | 27 +++++++++++++++++++--------
 89 files changed, 38 insertions(+), 126 deletions(-)

-- 
2.39.0



             reply	other threads:[~2023-02-02 13:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 13:38 Markus Armbruster [this message]
2023-02-02 13:38 ` [PATCH v6 01/20] scripts/clean-includes: Fully skip / ignore files Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 02/20] scripts/clean-includes: Don't claim duplicate headers found when not Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 03/20] scripts/clean-includes: Skip symbolic links Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 04/20] scripts/clean-includes: Improve --git commit message Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 05/20] bsd-user: Clean up includes Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 06/20] crypto: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 07/20] hw/cxl: " Markus Armbruster
2023-02-02 15:51   ` Jonathan Cameron via
2023-02-02 15:51     ` Jonathan Cameron
2023-02-02 13:38 ` [PATCH v6 08/20] hw/input: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 09/20] hw/tricore: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 10/20] qga: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 11/20] migration: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 12/20] net: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 13/20] target/hexagon: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 14/20] riscv: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 15/20] block: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 16/20] accel: " Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 17/20] Fix non-first inclusions of qemu/osdep.h Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 18/20] Don't include headers already included by qemu/osdep.h Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 19/20] 9p: Drop superfluous include of linux/limits.h Markus Armbruster
2023-02-02 13:38 ` [PATCH v6 20/20] Drop duplicate #include Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230202133830.2152150-1-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=alistair@alistair23.me \
    --cc=berrange@redhat.com \
    --cc=bin.meng@windriver.com \
    --cc=dgilbert@redhat.com \
    --cc=groug@kaod.org \
    --cc=hreitz@redhat.com \
    --cc=imp@bsdimp.com \
    --cc=jasowang@redhat.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=kevans@freebsd.org \
    --cc=kkostiuk@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=tsimpson@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.