[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 04/19] Include qapi/error.h exactly where nee
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 04/19] Include qapi/error.h exactly where needed |
Date: |
Wed, 31 Jan 2018 09:16:00 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/31/2018 08:48 AM, Markus Armbruster wrote:
> This cleanup makes the number of objects depending on qapi/error.h
> drop from 1910 (out of 4743) to 1612 in my "build everything" tree.
>
> While there, separate #include from file comment with a blank line,
> and drop a useless comment on why qemu/osdep.h is included first.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> +++ b/block/write-threshold.c
> @@ -16,6 +16,7 @@
> #include "block/write-threshold.h"
> #include "qemu/notify.h"
> #include "qapi-event.h"
> +#include "qapi/error.h"
> #include "qmp-commands.h"
>
>
Worth squashing a double blank line while here?
> +++ b/hw/pci-bridge/i82801b11.c
> @@ -44,7 +44,6 @@
> #include "qemu/osdep.h"
> #include "hw/pci/pci.h"
> #include "hw/i386/ich9.h"
> -#include "qapi/error.h"
>
>
>
> /*****************************************************************************/
And here
> +++ b/include/crypto/random.h
> @@ -22,7 +22,6 @@
> #define QCRYPTO_RANDOM_H
>
> #include "qemu-common.h"
> -#include "qapi/error.h"
>
>
> /**
> diff --git a/include/crypto/xts.h b/include/crypto/xts.h
> index da32ab82b6..719971afb7 100644
> --- a/include/crypto/xts.h
> +++ b/include/crypto/xts.h
> @@ -27,7 +27,6 @@
> #define QCRYPTO_XTS_H
>
> #include "qemu-common.h"
> -#include "qapi/error.h"
>
>
> #define XTS_BLOCK_SIZE 16
And here
> +++ b/include/ui/console.h
> @@ -6,7 +6,9 @@
> #include "qapi/qmp/qdict.h"
> #include "qemu/notify.h"
> #include "qemu/error-report.h"
> +#ifndef CONFIG_VNC
> #include "qapi/error.h"
> +#endif
Interesting conditional; it's because of the static inline fallbacks
that are also conditional. Makes sense. An alternative would be having
the fallbacks be in a .c rather than static inline in the .h, but it
doesn't bother me enough to worry about it.
My R-b stands whether or not you make more whitespace tweaks.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 02/19] Clean up includes, (continued)
- [Qemu-devel] [PATCH v2 07/19] Typedef the subtypes of QObject in qemu/typedefs.h, too, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 06/19] Include qmp-commands.h exactly where needed, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 17/19] Drop superfluous includes of qapi/qmp/dispatch.h, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 13/19] Include qapi/qmp/qstring.h exactly where needed, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 05/19] Drop superfluous includes of qapi/qmp/qerror.h, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 09/19] qdict qlist: Make most helper macros functions, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 12/19] Include qapi/qmp/qdict.h exactly where needed, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 14/19] Include qapi/qmp/qbool.h exactly where needed, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 04/19] Include qapi/error.h exactly where needed, Markus Armbruster, 2018/01/31
- Re: [Qemu-devel] [PATCH v2 04/19] Include qapi/error.h exactly where needed,
Eric Blake <=
- [Qemu-devel] [PATCH v2 18/19] Drop superfluous includes of qapi/qmp/qjson.h, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 11/19] Include qapi/qmp/qlist.h exactly where needed, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 08/19] Eliminate qapi/qmp/types.h, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 15/19] Include qapi/qmp/qnum.h exactly where needed, Markus Armbruster, 2018/01/31
- [Qemu-devel] [PATCH v2 19/19] Move include qemu/option.h from qemu-common.h to actual users, Markus Armbruster, 2018/01/31
- Re: [Qemu-devel] [PATCH v2 00/19] Clean up includes to reduce compile time, no-reply, 2018/01/31