diff mbox series

[v3,1/2] Revert xen/io/ring.h of "Clean up a few header guard symbols"

Message ID 20190621105441.3025-2-anthony.perard@citrix.com
State New
Headers show
Series Fix build of Xen support + cleanup | expand

Commit Message

Anthony PERARD June 21, 2019, 10:54 a.m. UTC
This reverts changes to include/hw/xen/io/ring.h from commit
37677d7db39a3c250ad661d00fb7c3b59d047b1f.

Following 37677d7db3 "Clean up a few header guard symbols", QEMU start
to fail to build:

In file included from ~/xen/tools/../tools/include/xen/io/blkif.h:31:0,
                 from ~/xen/tools/qemu-xen-dir/hw/block/xen_blkif.h:5,
                 from ~/xen/tools/qemu-xen-dir/hw/block/xen-block.c:22:
~/xen/tools/../tools/include/xen/io/ring.h:68:0: error: "__CONST_RING_SIZE" redefined [-Werror]
 #define __CONST_RING_SIZE(_s, _sz) \

In file included from ~/xen/tools/qemu-xen-dir/hw/block/xen_blkif.h:4:0,
                 from ~/xen/tools/qemu-xen-dir/hw/block/xen-block.c:22:
~/xen/tools/qemu-xen-dir/include/hw/xen/io/ring.h:66:0: note: this is the location of the previous definition
 #define __CONST_RING_SIZE(_s, _sz) \

The issue is that some public xen headers have been imported (by
f65eadb639 "xen: import ring.h from xen") but not all. With the change
in the guards symbole, the ring.h header start to be imported twice.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
CC: Markus Armbruster <armbru@redhat.com>
---

Notes:
    v3:
    - new patch, replace "xen: Fix build with public headers" from previous
      patch series version
    - Revert problematic change instead.

 include/hw/xen/io/ring.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Daniel P. Berrangé June 21, 2019, 11:07 a.m. UTC | #1
On Fri, Jun 21, 2019 at 11:54:40AM +0100, Anthony PERARD wrote:
> This reverts changes to include/hw/xen/io/ring.h from commit
> 37677d7db39a3c250ad661d00fb7c3b59d047b1f.
> 
> Following 37677d7db3 "Clean up a few header guard symbols", QEMU start
> to fail to build:
> 
> In file included from ~/xen/tools/../tools/include/xen/io/blkif.h:31:0,
>                  from ~/xen/tools/qemu-xen-dir/hw/block/xen_blkif.h:5,
>                  from ~/xen/tools/qemu-xen-dir/hw/block/xen-block.c:22:
> ~/xen/tools/../tools/include/xen/io/ring.h:68:0: error: "__CONST_RING_SIZE" redefined [-Werror]
>  #define __CONST_RING_SIZE(_s, _sz) \
> 
> In file included from ~/xen/tools/qemu-xen-dir/hw/block/xen_blkif.h:4:0,
>                  from ~/xen/tools/qemu-xen-dir/hw/block/xen-block.c:22:
> ~/xen/tools/qemu-xen-dir/include/hw/xen/io/ring.h:66:0: note: this is the location of the previous definition
>  #define __CONST_RING_SIZE(_s, _sz) \
> 
> The issue is that some public xen headers have been imported (by
> f65eadb639 "xen: import ring.h from xen") but not all. With the change
> in the guards symbole, the ring.h header start to be imported twice.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> CC: Markus Armbruster <armbru@redhat.com>
> ---
> 
> Notes:
>     v3:
>     - new patch, replace "xen: Fix build with public headers" from previous
>       patch series version
>     - Revert problematic change instead.
> 
>  include/hw/xen/io/ring.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
Paul Durrant June 21, 2019, 12:14 p.m. UTC | #2
> -----Original Message-----
> From: Anthony PERARD <anthony.perard@citrix.com>
> Sent: 21 June 2019 11:55
> To: qemu-devel@nongnu.org
> Cc: Stefano Stabellini <sstabellini@kernel.org>; Paul Durrant <Paul.Durrant@citrix.com>; Anthony
> Perard <anthony.perard@citrix.com>; xen-devel@lists.xenproject.org; Daniel P. Berrangé
> <berrange@redhat.com>; Markus Armbruster <armbru@redhat.com>
> Subject: [PATCH v3 1/2] Revert xen/io/ring.h of "Clean up a few header guard symbols"
> 
> This reverts changes to include/hw/xen/io/ring.h from commit
> 37677d7db39a3c250ad661d00fb7c3b59d047b1f.
> 
> Following 37677d7db3 "Clean up a few header guard symbols", QEMU start
> to fail to build:
> 
> In file included from ~/xen/tools/../tools/include/xen/io/blkif.h:31:0,
>                  from ~/xen/tools/qemu-xen-dir/hw/block/xen_blkif.h:5,
>                  from ~/xen/tools/qemu-xen-dir/hw/block/xen-block.c:22:
> ~/xen/tools/../tools/include/xen/io/ring.h:68:0: error: "__CONST_RING_SIZE" redefined [-Werror]
>  #define __CONST_RING_SIZE(_s, _sz) \
> 
> In file included from ~/xen/tools/qemu-xen-dir/hw/block/xen_blkif.h:4:0,
>                  from ~/xen/tools/qemu-xen-dir/hw/block/xen-block.c:22:
> ~/xen/tools/qemu-xen-dir/include/hw/xen/io/ring.h:66:0: note: this is the location of the previous
> definition
>  #define __CONST_RING_SIZE(_s, _sz) \
> 
> The issue is that some public xen headers have been imported (by
> f65eadb639 "xen: import ring.h from xen") but not all. With the change
> in the guards symbole, the ring.h header start to be imported twice.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> ---
> CC: Markus Armbruster <armbru@redhat.com>
> ---
> 
> Notes:
>     v3:
>     - new patch, replace "xen: Fix build with public headers" from previous
>       patch series version
>     - Revert problematic change instead.
> 
>  include/hw/xen/io/ring.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/hw/xen/io/ring.h b/include/hw/xen/io/ring.h
> index 62abfd7a6e..1adacf09f9 100644
> --- a/include/hw/xen/io/ring.h
> +++ b/include/hw/xen/io/ring.h
> @@ -24,8 +24,8 @@
>   * Tim Deegan and Andrew Warfield November 2004.
>   */
> 
> -#ifndef XEN_PUBLIC_IO_RING_H
> -#define XEN_PUBLIC_IO_RING_H
> +#ifndef __XEN_PUBLIC_IO_RING_H__
> +#define __XEN_PUBLIC_IO_RING_H__
> 
>  /*
>   * When #include'ing this header, you need to provide the following
> @@ -469,7 +469,7 @@ struct name##_data_intf {                                                     \
>  };                                                                            \
>  DEFINE_XEN_FLEX_RING(name)
> 
> -#endif /* XEN_PUBLIC_IO_RING_H */
> +#endif /* __XEN_PUBLIC_IO_RING_H__ */
> 
>  /*
>   * Local variables:
> --
> Anthony PERARD
diff mbox series

Patch

diff --git a/include/hw/xen/io/ring.h b/include/hw/xen/io/ring.h
index 62abfd7a6e..1adacf09f9 100644
--- a/include/hw/xen/io/ring.h
+++ b/include/hw/xen/io/ring.h
@@ -24,8 +24,8 @@ 
  * Tim Deegan and Andrew Warfield November 2004.
  */
 
-#ifndef XEN_PUBLIC_IO_RING_H
-#define XEN_PUBLIC_IO_RING_H
+#ifndef __XEN_PUBLIC_IO_RING_H__
+#define __XEN_PUBLIC_IO_RING_H__
 
 /*
  * When #include'ing this header, you need to provide the following
@@ -469,7 +469,7 @@  struct name##_data_intf {                                                     \
 };                                                                            \
 DEFINE_XEN_FLEX_RING(name)
 
-#endif /* XEN_PUBLIC_IO_RING_H */
+#endif /* __XEN_PUBLIC_IO_RING_H__ */
 
 /*
  * Local variables: