qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 01/20] sys_membarrier: fix up include directives


From: Eric Blake
Subject: Re: [Qemu-devel] [PULL 01/20] sys_membarrier: fix up include directives
Date: Fri, 6 Apr 2018 12:44:49 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/06/2018 12:11 PM, Paolo Bonzini wrote:
> From: Bruce Rogers <address@hidden>
> 
> Our rule right now is to use <> for external headers only.
> util/sys_membarrier.c violates that. Fix it up.
> 
> Signed-off-by: Bruce Rogers <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  util/sys_membarrier.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Keeping this one as-is is fine, since it is already part of a pull
request, but...

> 
> diff --git a/util/sys_membarrier.c b/util/sys_membarrier.c
> index 8dcb53e..1362c0c 100644
> --- a/util/sys_membarrier.c
> +++ b/util/sys_membarrier.c
> @@ -6,9 +6,9 @@
>   * Author: Paolo Bonzini <address@hidden>
>   */
>  
> -#include <qemu/osdep.h>
> -#include <qemu/sys_membarrier.h>
> -#include <qemu/error-report.h>
> +#include "qemu/osdep.h"
> +#include "qemu/sys_membarrier.h"
> +#include "qemu/error-report.h"
>  
>  #ifdef CONFIG_LINUX
>  #include <linux/membarrier.h>

Our style also recommends ordering things as:

"qemu/osdep.h"
all <system.h>
"any other qemu.h"

to minimize chances of collisions from something in a qemu header
causing a system header to go wrong (that is, osdep.h has to go first,
because it might influence a system header, but nothing else should risk
influencing a system header).  So if you wanted, you could also sink the
"qemu/sys_membarrier.h" and "qemu/error-report.h" includes after the
<linux/membarrier.h> and any other system headers not shown in the
context of the patch.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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