qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/8] all: Clean up includes


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 7/8] all: Clean up includes
Date: Thu, 18 Feb 2016 20:10:12 +0000

On 18 February 2016 at 19:16, Eric Blake <address@hidden> wrote:
> 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 <address@hidden>
>> ---
>
>>  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.

Looking at this is on my todo list, but TBH once this patch is in
master I don't expect much backsliding, because forgetting osdep.h
will result in your new file not compiling at all. It's only in
this transitional stage where qemu-common.h still pulls in osdep.h
that it's possible for a new file to slip in without the include.

> 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.

OK. Will put it on my list to fix up later.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]