On 04/06/2018 12:11 PM, Paolo Bonzini wrote:
> From: Bruce Rogers <brog...@suse.com>
> 
> 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 <brog...@suse.com>
> Message-Id: <20180329151018.15319-1-brog...@suse.com>
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  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 <pbonz...@redhat.com>
>   */
>  
> -#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