[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 18/18] Move include qemu/option.h from qemu-comm
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 18/18] Move include qemu/option.h from qemu-common.h to actual users |
Date: |
Wed, 31 Jan 2018 09:14:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 01/30/2018 04:22 AM, Markus Armbruster wrote:
>> qemu-common.h includes qemu/option.h, but most places that include the
>> former don't actually need the latter. Drop the include, and add it
>> to the places that actually need it.
>>
>> While there, drop superfluous includes of both headers.
>>
>> This cleanup makes the number of objects depending on qemu/option.h
>> drop from 4542 (out of 4739) to 284 in my "build everything" tree.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> 103 files changed, 98 insertions(+), 54 deletions(-)
>
> Bigger effort, but still a nice cleanup. And especially nice if we're
> trying to reduce users of QemuOpts.
>
> Reviewed-by: Eric Blake <address@hidden>
>
>> +++ b/block/file-posix.c
>> @@ -21,12 +21,14 @@
>> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>> * THE SOFTWARE.
>> */
>> +
>> #include "qemu/osdep.h"
>> #include "qapi/error.h"
>> #include "qemu/cutils.h"
>> #include "qemu/error-report.h"
>> #include "block/block_int.h"
>> #include "qemu/module.h"
>> +#include "qemu/option.h"
>> #include "trace.h"
>
> More of the blank line before osdep.h cleanup comment.
>
>> +++ b/hw/9pfs/9p-handle.c
>> @@ -22,6 +22,7 @@
>> #include "qemu/xattr.h"
>> #include "qemu/cutils.h"
>> #include "qemu/error-report.h"
>> +#include "qemu/option.h"
>> #include <linux/fs.h>
>> #ifdef CONFIG_LINUX_MAGIC_H
>> #include <linux/magic.h>
>
> Shouldn't we be fixing this one to include system headers (like
> <linux/fs.h> prior to internal headers? Separate cleanup, though.
I'd love to see a tree-wide #include ordering cleanup, with a checkpatch
extension or a make target check-source to keep it clean. Out of this
series' scope.
>> diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
>> index c6d8af4fb8..d85494bd31 100644
>> --- a/hw/9pfs/9p-local.c
>> +++ b/hw/9pfs/9p-local.c
>> @@ -26,6 +26,7 @@
>> #include "qapi/error.h"
>> #include "qemu/cutils.h"
>> #include "qemu/error-report.h"
>> +#include "qemu/option.h"
>> #include <libgen.h>
>> #include <linux/fs.h>
>
> More of that separate cleanup.
- Re: [Qemu-devel] [PATCH 13/18] Include qapi/qmp/qbool.h exactly where needed, (continued)
- [Qemu-devel] [PATCH 17/18] Drop superfluous includes of qapi/qmp/qjson.h, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 08/18] qdict qlist: Make most helper macros functions, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 06/18] Typedef the subtypes of QObject in qemu/typedefs.h, too, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 18/18] Move include qemu/option.h from qemu-common.h to actual users, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 03/18] Include qapi/error.h exactly where needed, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 02/18] Drop superfluous includes of qapi-types.h, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 16/18] Drop superfluous includes of qapi/qmp/dispatch.h, Markus Armbruster, 2018/01/30
- [Qemu-devel] [PATCH 15/18] Include qapi/qmp/qnull.h exactly where needed, Markus Armbruster, 2018/01/30