qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] cpu: Clean up includes


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] cpu: Clean up includes
Date: Mon, 18 Jan 2016 18:05:22 +0000

On 18 January 2016 at 18:00, Andreas Färber <address@hidden> wrote:
> Am 18.01.2016 um 18:35 schrieb Peter Maydell:
>> 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>
>> ---
>>  qom/cpu.c         | 1 +
>>  target-i386/cpu.c | 5 +----
>>  2 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/qom/cpu.c b/qom/cpu.c
>> index 8f537a4..edd6b6a 100644
>> --- a/qom/cpu.c
>> +++ b/qom/cpu.c
>> @@ -18,6 +18,7 @@
>>   * <http://www.gnu.org/licenses/gpl-2.0.html>
>>   */
>>
>> +#include "qemu/osdep.h"
>>  #include "qemu-common.h"
>
> Shouldn't qemu-common.h include osdep.h?

It does, but the intention is that every .c file should include
qemu/osdep.h as its first include (even if some other include
it has also results in osdep.h being pulled in). This is a simple
rule that's easy to check in code review and hopefully also
in an automated way. It should also help us in future
disentangling of some of the things that qemu-common.h pulls in
into their own header files.

thanks
-- PMM



reply via email to

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