tools/arm: include xen-tools/libs.h from libxl_arm_acpi.c
PATCH 1/1 tools/arm: include xen-tools/libs.h from libxl_arm_acpi.c
libxl_arm_acpi.c is using BUILD_BUG_ON but it is not including xen-tools/libs.h that defines it.
--- tools/libxl/libxl_arm_acpi.c | 1 + 1 file changed, 1 insertion(+)
tools/libxl/libxl_arm_acpi.c +1 -0
@@ -19,6 +19,7 @@#include "libxl_arm.h" #include <stdint.h> +#include <xen-tools/libs.h> /* Below typedefs are useful for the headers under acpi/ */ typedef uint8_t u8 ;
Signature · 7 lines
2.17.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Stefano Stabellini
libxl_arm_acpi.cis usingBUILD_BUG_ONbut it is not includingxen-tools/libs.hthat defines it.Signed-off-by Stefano Stabellini <[email protected]>
Juergen, this is a trivial patch. I think it can go in 4.13.
Wei.
Quoted 19 lines
--- tools/libxl/libxl_arm_acpi.c | 1 + 1 file changed, 1 insertion(+)tools/libxl/libxl_arm_acpi.c +1
-0@@ -19,6 +19,7 @@#include "libxl_arm.h" #include <stdint.h> +#include <xen-tools/libs.h> /* Below typedefs are useful for the headers under acpi/ */ typedef uint8_t u8 ;Signature · 1 line
2.17.1
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · Wei Liu
Quoted 4 lines · Stefano Stabellini
libxl_arm_acpi.cis usingBUILD_BUG_ONbut it is not includingxen-tools/libs.hthat defines it.Signed-off-by Stefano Stabellini <[email protected]>Acked-by Wei Liu <[email protected]>Juergen, this is a trivial patch. I think it can go in 4.13.
Why is this patch needed?
tools/libxl/libxl_arm_acpi.c includes libxl_arm.h, which includes libxl_internal.h, which includes xen-tools/libs.h.
So this is a purely cosmetic patch, especially as libxl_arm.h and libxl_internal.h are libxl-internal includes, so there is a very low risk for the include of xen-tools/libs.h suddenly disappearing, and even it would due to a patch of one of those include files, it would be detected by a failing build immediately.
So I won't take it for 4.13, even if being trivial.
Juergen
Quoted 14 lines
Wei.
Quoted 11 lines
--- tools/libxl/libxl_arm_acpi.c | 1 + 1 file changed, 1 insertion(+)tools/libxl/libxl_arm_acpi.c +0
-0@@ -19,6 +19,7 @@#include "libxl_arm.h"
Quoted 8 lines
Quoted 8 lines
tools/libxl/libxl_arm_acpi.c +1
-0#include <stdint.h> +#include <xen-tools/libs.h> /* Below typedefs are useful for the headers under acpi/ */ typedef uint8_t u8 ;Signature · 1 line
2.17.1
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Jürgen Groß
Quoted 6 lines · Wei Liu
Quoted 4 lines · Stefano Stabellini
libxl_arm_acpi.cis usingBUILD_BUG_ONbut it is not includingxen-tools/libs.hthat defines it.Signed-off-by Stefano Stabellini <[email protected]>
Quoted 8 lines
Quoted 3 lines
Acked-by Wei Liu <[email protected]>Juergen, this is a trivial patch. I think it can go in 4.13.
Why is this patch needed?
tools/libxl/libxl_arm_acpi.cincludeslibxl_arm.h, which includeslibxl_internal.h, which includesxen-tools/libs.h.
Oh I missed that.
In that case I don't think this patch is required for 4.13.
Stefano, did you see a build error or something?
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 14 lines · Wei Liu
Quoted 13 lines · Jürgen Groß
Quoted 9 lines · Wei Liu
Quoted 4 lines · Stefano Stabellini
libxl_arm_acpi.cis usingBUILD_BUG_ONbut it is not includingxen-tools/libs.hthat defines it.Signed-off-by Stefano Stabellini <[email protected]>Acked-by Wei Liu <[email protected]>Juergen, this is a trivial patch. I think it can go in 4.13.
Why is this patch needed?
Quoted 9 lines
Quoted 2 lines
tools/libxl/libxl_arm_acpi.cincludeslibxl_arm.h, which includeslibxl_internal.h, which includesxen-tools/libs.h.Oh I missed that.
In that case I don't think this patch is required for 4.13.
Stefano, did you see a build error or something?
Hi Wei, and Jurgen,
Thanks for the review and also for probably catching a mistake in the patch.
Yes, this patch fixes a build error with the latest Yocto and gcc 9:
| libxl_arm_acpi.c: In function 'make_acpi_rsdp': | libxl_arm_acpi.c:193:5: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration] | 193 | BUILD_BUG_ON(sizeof(ACPI_OEM_ID) != sizeof(rsdp->oem_id)); | | ^~~~~~~~~~~~
but the error was based on an older Xen tree based on 4.11, which doesn't have an include of xen-tools/libs.h in libxl_internal.h. So, I think Juergen is right that this should not be needed upstream.
I didn't actually have a repro (the issue was reported to me by somebody else), so before I sent the patch to xen-devel I manually check the code but couldn't actually try a build. And I didn't notice the include xen-tools/libs.h in libxl_internal.h. Sorry about that.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel