From: "Alex Bennée" <alex.bennee@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, imammedo@redhat.com,
ani@anisinha.ca, peter.maydell@linaro.org, laurent@vivier.eu,
edgar.iglesias@gmail.com, Alistair.Francis@wdc.com,
bin.meng@windriver.com, palmer@dabbelt.com,
marcel.apfelbaum@gmail.com, yangxiaojuan@loongson.cn,
gaosong@loongson.cn, richard.henderson@linaro.org, deller@gmx.de,
jasowang@redhat.com, vikram.garhwal@amd.com,
francisco.iglesias@amd.com, clg@kaod.org, kraxel@redhat.com,
marcandre.lureau@redhat.com, riku.voipio@iki.fi,
qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, crwulff@gmail.com,
marex@denx.de, Bernhard Beschow <shentey@gmail.com>,
qemu-arm@nongnu.org
Subject: Re: [PATCH v2 4/4] docs/devel: Rules on #include in headers
Date: Fri, 23 Dec 2022 23:41:08 +0000 [thread overview]
Message-ID: <87cz89y9g9.fsf@linaro.org> (raw)
In-Reply-To: <20221222120813.727830-5-armbru@redhat.com>
Markus Armbruster <armbru@redhat.com> writes:
> Rules for headers were proposed a long time ago, and generally liked:
>
> Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
>
> Wortk them into docs/devel/style.rst.
nit: spelling Work
>
> Suggested-by: Bernhard Beschow <shentey@gmail.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> docs/devel/style.rst | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/docs/devel/style.rst b/docs/devel/style.rst
> index 7ddd42b6c2..68aa776930 100644
> --- a/docs/devel/style.rst
> +++ b/docs/devel/style.rst
> @@ -293,6 +293,13 @@ that QEMU depends on.
> Do not include "qemu/osdep.h" from header files since the .c file will have
> already included it.
>
> +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, consider
> +putting those into qemu/typedefs.h instead of including the header.
> +
> +Cyclic inclusion is forbidden.
> +
> C types
> =======
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2022-12-23 23:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 12:08 [PATCH v2 0/4] Clean up includes Markus Armbruster
2022-12-22 12:08 ` [PATCH v2 1/4] include/hw/virtio: Break inclusion loop Markus Armbruster
2022-12-23 2:58 ` Jason Wang
2022-12-23 3:31 ` Edgar E. Iglesias
2022-12-22 12:08 ` [PATCH v2 2/4] include: Include headers where needed Markus Armbruster
2022-12-22 12:08 ` [PATCH v2 3/4] include: Don't include qemu/osdep.h Markus Armbruster
2023-01-08 6:51 ` Michael S. Tsirkin
2022-12-22 12:08 ` [PATCH v2 4/4] docs/devel: Rules on #include in headers Markus Armbruster
2022-12-23 10:47 ` Bernhard Beschow
2023-01-09 12:01 ` Markus Armbruster
2022-12-23 23:41 ` Alex Bennée [this message]
2022-12-22 12:10 ` [PATCH v2 0/4] Clean up includes Markus Armbruster
2023-01-05 1:50 ` Michael S. Tsirkin
2023-01-08 6:49 ` 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=87cz89y9g9.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=Alistair.Francis@wdc.com \
--cc=ani@anisinha.ca \
--cc=armbru@redhat.com \
--cc=bin.meng@windriver.com \
--cc=clg@kaod.org \
--cc=crwulff@gmail.com \
--cc=deller@gmx.de \
--cc=edgar.iglesias@gmail.com \
--cc=francisco.iglesias@amd.com \
--cc=gaosong@loongson.cn \
--cc=imammedo@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=marex@denx.de \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=riku.voipio@iki.fi \
--cc=shentey@gmail.com \
--cc=vikram.garhwal@amd.com \
--cc=yangxiaojuan@loongson.cn \
/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).