* [PATCH 1/1] efi_selftest: illegal cast to pointer in initrddump
@ 2021-03-14 9:19 Heinrich Schuchardt
2021-03-14 17:45 ` Ilias Apalodimas
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-03-14 9:19 UTC (permalink / raw)
To: u-boot
On 32bit systems u64 cannot directly be cast to void *.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
lib/efi_selftest/initrddump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_selftest/initrddump.c b/lib/efi_selftest/initrddump.c
index c23a05c718..325951b498 100644
--- a/lib/efi_selftest/initrddump.c
+++ b/lib/efi_selftest/initrddump.c
@@ -272,7 +272,7 @@ static efi_status_t get_initrd(void **initrd, efi_uintn_t *initrd_size)
error(L"Out of memory\r\n");
return ret;
}
- *initrd = (void *)buffer;
+ *initrd = (void *)(uintptr_t)buffer;
ret = load_file2_prot->load_file(load_file2_prot, dp, false,
initrd_size, *initrd);
if (ret != EFI_SUCCESS) {
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] efi_selftest: illegal cast to pointer in initrddump
2021-03-14 9:19 [PATCH 1/1] efi_selftest: illegal cast to pointer in initrddump Heinrich Schuchardt
@ 2021-03-14 17:45 ` Ilias Apalodimas
0 siblings, 0 replies; 2+ messages in thread
From: Ilias Apalodimas @ 2021-03-14 17:45 UTC (permalink / raw)
To: u-boot
On Sun, Mar 14, 2021 at 10:19:39AM +0100, Heinrich Schuchardt wrote:
> On 32bit systems u64 cannot directly be cast to void *.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> lib/efi_selftest/initrddump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/efi_selftest/initrddump.c b/lib/efi_selftest/initrddump.c
> index c23a05c718..325951b498 100644
> --- a/lib/efi_selftest/initrddump.c
> +++ b/lib/efi_selftest/initrddump.c
> @@ -272,7 +272,7 @@ static efi_status_t get_initrd(void **initrd, efi_uintn_t *initrd_size)
> error(L"Out of memory\r\n");
> return ret;
> }
> - *initrd = (void *)buffer;
> + *initrd = (void *)(uintptr_t)buffer;
> ret = load_file2_prot->load_file(load_file2_prot, dp, false,
> initrd_size, *initrd);
> if (ret != EFI_SUCCESS) {
> --
> 2.30.1
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-14 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-14 9:19 [PATCH 1/1] efi_selftest: illegal cast to pointer in initrddump Heinrich Schuchardt
2021-03-14 17:45 ` Ilias Apalodimas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox