All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 7/8] all: Clean up includes
Date: Thu, 18 Feb 2016 12:16:40 -0700	[thread overview]
Message-ID: <56C61898.4050302@redhat.com> (raw)
In-Reply-To: <1455818725-7647-8-git-send-email-peter.maydell@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

On 02/18/2016 11:05 AM, Peter Maydell wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---

>  56 files changed, 2 insertions(+), 100 deletions(-)
> 

> +++ b/io/channel-util.c
> @@ -18,6 +18,7 @@
>   *
>   */
>  
> +#include "qemu/osdep.h"
>  #include "io/channel-util.h"
>  #include "io/channel-file.h"
>  #include "io/channel-socket.h"

Ah, so the 2 insertions are due to recent file additions, after your
last round of cleanups.

Any way to automate this into checkpatch.pl for new file creation?  Then
again, not all developers have Coccinelle installed.  But even checking
whether the string 'include.*qemu/osdep.h' is present in a new file may
help, even if it doesn't detect it being included out-of-order.

> +++ b/slirp/slirp.h
> @@ -1,11 +1,9 @@
>  #ifndef __COMMON_H__
>  #define __COMMON_H__
>  
> -#include "config-host.h"
>  #include "slirp_config.h"
>  
>  #ifdef _WIN32
> -# include <inttypes.h>
>  
>  typedef char *caddr_t;
>  
> @@ -23,43 +21,31 @@ typedef char *caddr_t;
>  # endif
>  #endif
>  
> -#include <sys/types.h>
>  #ifdef HAVE_SYS_BITYPES_H
>  # include <sys/bitypes.h>
>  #endif
>  
> -#include <sys/time.h>
>  
>  #ifdef HAVE_UNISTD_H
> -# include <unistd.h>
>  #endif
>  
>  #ifdef HAVE_STDLIB_H
> -# include <stdlib.h>
>  #endif

Leftover dead checks of HAVE_UNISTD_H and so forth; this file could use
further manual cleanups.  For that matter, do we even need HAVE_UNISTD_H
in slirp/slirp_config.h any more?  There's probably quite a bit of
pruning of cruft we could do.  But as this patch was completely
automated, I'm fine if that cleanup is done as followups.

Therefore,
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-02-18 19:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 18:05 [Qemu-devel] [PATCH 0/8] more include cleaning Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 1/8] cpu: Clean up includes Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 2/8] osdep.h: Define macros for the benefit of C++ before C++11 Peter Maydell
2016-02-18 18:51   ` Eric Blake
2016-02-18 18:05 ` [Qemu-devel] [PATCH 3/8] disas/arm-a64.cc: Include osdep.h first Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 4/8] scripts/clean-includes: Enhance to handle header files Peter Maydell
2016-02-18 18:36   ` Peter Maydell
2016-02-18 19:04   ` Eric Blake
2016-02-18 20:07     ` Peter Maydell
2016-02-19 18:03     ` Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option Peter Maydell
2016-02-18 19:09   ` Eric Blake
2016-02-18 18:05 ` [Qemu-devel] [PATCH 6/8] osdep.h: Include config-target.h if NEED_CPU_H is defined Peter Maydell
2016-02-18 19:09   ` Eric Blake
2016-02-18 18:05 ` [Qemu-devel] [PATCH 7/8] all: Clean up includes Peter Maydell
2016-02-18 19:16   ` Eric Blake [this message]
2016-02-18 20:10     ` Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 8/8] include: " Peter Maydell
2016-02-18 19:54   ` Eric Blake
2016-02-18 20:12     ` Peter Maydell
2016-02-18 20:04 ` [Qemu-devel] [PATCH 0/8] more include cleaning Eric Blake

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=56C61898.4050302@redhat.com \
    --to=eblake@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.