public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v1] efi: include libfdt header only for aarch64 and riscv
@ 2024-04-10  7:53 vsntk18
  2024-04-10  8:11 ` Andrew Jones
  0 siblings, 1 reply; 2+ messages in thread
From: vsntk18 @ 2024-04-10  7:53 UTC (permalink / raw)
  To: kvm; +Cc: papaluri, andrew.jones, Vasant Karasulli

From: Vasant Karasulli <vkarasulli@suse.de>

For x86, preprocessor fails to locate headers included by lib/libfdt.h
as they are missing from the include path.

Fixes: 9632ce446b8f ("arm64: efi: Improve device tree discovery")
Signed-off-by: Vasant Karasulli <vkarasulli@suse.de>
---
 lib/efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi.c b/lib/efi.c
index 44337837..f396bd71 100644
--- a/lib/efi.c
+++ b/lib/efi.c
@@ -12,7 +12,6 @@
 #include <stdlib.h>
 #include <asm/setup.h>
 #include "efi.h"
-#include "libfdt/libfdt.h"

 /* From each arch */
 extern char *initrd;
@@ -205,6 +204,7 @@ static char *efi_convert_cmdline(struct efi_loaded_image_64 *image, int *cmd_lin
 }

 #if defined(__aarch64__) || defined(__riscv)
+#include "libfdt/libfdt.h"
 /*
  * Open the file and read it into a buffer.
  */

base-commit: 9f993e210064ba9f444b752f56a85bdafdb1780e
--
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [kvm-unit-tests PATCH v1] efi: include libfdt header only for aarch64 and riscv
  2024-04-10  7:53 [kvm-unit-tests PATCH v1] efi: include libfdt header only for aarch64 and riscv vsntk18
@ 2024-04-10  8:11 ` Andrew Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Jones @ 2024-04-10  8:11 UTC (permalink / raw)
  To: vsntk18; +Cc: kvm, papaluri, Vasant Karasulli

On Wed, Apr 10, 2024 at 09:53:58AM +0200, vsntk18@gmail.com wrote:
> From: Vasant Karasulli <vkarasulli@suse.de>
> 
> For x86, preprocessor fails to locate headers included by lib/libfdt.h
> as they are missing from the include path.
> 
> Fixes: 9632ce446b8f ("arm64: efi: Improve device tree discovery")
> Signed-off-by: Vasant Karasulli <vkarasulli@suse.de>
> ---
>  lib/efi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/efi.c b/lib/efi.c
> index 44337837..f396bd71 100644
> --- a/lib/efi.c
> +++ b/lib/efi.c
> @@ -12,7 +12,6 @@
>  #include <stdlib.h>
>  #include <asm/setup.h>
>  #include "efi.h"
> -#include "libfdt/libfdt.h"
> 
>  /* From each arch */
>  extern char *initrd;
> @@ -205,6 +204,7 @@ static char *efi_convert_cmdline(struct efi_loaded_image_64 *image, int *cmd_lin
>  }
> 
>  #if defined(__aarch64__) || defined(__riscv)
> +#include "libfdt/libfdt.h"
>  /*
>   * Open the file and read it into a buffer.
>   */
> 
> base-commit: 9f993e210064ba9f444b752f56a85bdafdb1780e
> --
> 2.34.1
>

I wasn't able to get an x86-efi compile to fail without this, but the fix
looks good.

Merged.

Thanks,
drew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-10  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10  7:53 [kvm-unit-tests PATCH v1] efi: include libfdt header only for aarch64 and riscv vsntk18
2024-04-10  8:11 ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox