qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: imp@bsdimp.com, kevans@freebsd.org, berrange@redhat.com,
	ben.widawsky@intel.com, jonathan.cameron@huawei.com,
	kbastian@mail.uni-paderborn.de, jasowang@redhat.com,
	michael.roth@amd.com, kkostiuk@redhat.com, tsimpson@quicinc.com,
	palmer@dabbelt.com, alistair.francis@wdc.com,
	bin.meng@windriver.com, qemu-riscv@nongnu.org, philmd@linaro.org,
	mst@redhat.com
Subject: [PATCH v3 0/1] Clean up includes
Date: Thu, 12 Jan 2023 12:50:04 +0100	[thread overview]
Message-ID: <20230112115005.1504812-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 a number of rule violations.

Together with

    [PATCH v2 0/4] hw/ppc: Clean up includes
    [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes
        in master as commit 9d94c21363..881e019770
    [PATCH v2 0/3] block: Clean up includes
    [PATCH v3 0/5] coroutine: Clean up includes

just three inclusion loops remain reachable from include/:

    target/microblaze/cpu.h target/microblaze/mmu.h

    target/nios2/cpu.h target/nios2/mmu.h

    target/riscv/cpu.h target/riscv/pmp.h

Breaking them would be nice, but I'm out of steam.

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 (1):
  include: Don't include qemu/osdep.h

 bsd-user/qemu.h                 | 1 -
 crypto/block-luks-priv.h        | 1 -
 include/hw/cxl/cxl_host.h       | 1 -
 include/hw/input/pl050.h        | 1 -
 include/hw/tricore/triboard.h   | 1 -
 include/qemu/userfaultfd.h      | 1 -
 net/vmnet_int.h                 | 1 -
 qga/cutils.h                    | 1 -
 target/hexagon/hex_arch_types.h | 1 -
 target/hexagon/mmvec/macros.h   | 1 -
 target/riscv/pmu.h              | 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/x86_64/signal.c        | 1 +
 qga/cutils.c                    | 3 ++-
 17 files changed, 8 insertions(+), 12 deletions(-)

-- 
2.39.0



             reply	other threads:[~2023-01-12 11:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 11:50 Markus Armbruster [this message]
2023-01-12 11:50 ` [PATCH v3 1/1] include: Don't include qemu/osdep.h Markus Armbruster
2023-01-12 13:51   ` Michael S. Tsirkin
2023-01-12 13:56     ` Michael S. Tsirkin
2023-01-12 14:47       ` Markus Armbruster
2023-01-12 17:37         ` Michael S. Tsirkin
2023-01-12 17:44           ` Daniel P. Berrangé
2023-01-12 17:47             ` Michael S. Tsirkin
2023-01-12 14:52     ` Daniel P. Berrangé
2023-01-12 15:58       ` Peter Maydell
2023-01-12 16:07         ` Daniel P. Berrangé
2023-01-12 16:20           ` Peter Maydell
2023-01-12 16:30             ` Daniel P. Berrangé
2023-01-12 16:38               ` Peter Maydell
2023-01-12 17:43         ` Michael S. Tsirkin
2023-01-12 17:30   ` Jonathan Cameron via
2023-01-12 17:41   ` Michael S. Tsirkin

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=20230112115005.1504812-1-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=ben.widawsky@intel.com \
    --cc=berrange@redhat.com \
    --cc=bin.meng@windriver.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=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).