[U-Boot] [PATCH] efi_gop.c: Store gd->fb_base as uintptr_t

Mark Kettenis mark.kettenis at xs4all.nl
Sat Jul 29 16:34:09 UTC 2017


> From: Tom Rini <trini at konsulko.com>
> Date: Sat, 29 Jul 2017 11:43:21 -0400
> 
> Otherwise we get a warning about assignment about making a pointer from
> int without a cast.

That (uintptr_t *) cast makes no sense.  Either leave the member as a
"void *" and use a (void *) cast, or change it to uintptr_t and use a
(uintptr_t) cast.

Cheers,

Mark

> Cc: Alexander Graf <agraf at suse.de>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>  lib/efi_loader/efi_gop.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
> index 806cfaeea181..bd7ccccb93ff 100644
> --- a/lib/efi_loader/efi_gop.c
> +++ b/lib/efi_loader/efi_gop.c
> @@ -131,7 +131,7 @@ int efi_gop_register(void)
>  	struct efi_gop_obj *gopobj;
>  	u32 bpix, col, row;
>  	u64 fb_base, fb_size;
> -	void *fb;
> +	uintptr_t *fb;
>  
>  #ifdef CONFIG_DM_VIDEO
>  	struct udevice *vdev;
> @@ -155,7 +155,7 @@ int efi_gop_register(void)
>  	row = panel_info.vl_row;
>  	fb_base = gd->fb_base;
>  	fb_size = lcd_get_size(&line_len);
> -	fb = gd->fb_base;
> +	fb = (uintptr_t *)gd->fb_base;
>  #endif
>  
>  	switch (bpix) {
> -- 
> 1.9.1
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
> 
> 


More information about the U-Boot mailing list