lkml.org 
[lkml]   [2023]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] fbdev/g364fb: Fix a compilation issue
Hi Xurui,

On Thu, Jan 5, 2023 at 10:45 AM xurui <xurui@kylinos.cn> wrote:
> drivers/video/fbdev/g364fb.c:202:4: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>
> Signed-off-by: xurui <xurui@kylinos.cn>

Thanks for your patch!

> --- a/drivers/video/fbdev/g364fb.c
> +++ b/drivers/video/fbdev/g364fb.c
> @@ -175,7 +175,8 @@ int __init g364fb_init(void)
> {
> volatile unsigned int *curs_pal_ptr =
> (volatile unsigned int *) CURS_PAL_REG;
> - int mem, i;
> + int mem;
> + uintptr_t i;

This doesn't look like the right fix to me.

The line the compiler[1] complains about is:

*(unsigned short *) (CURS_PAT_REG + i * 8) = 0;

Interestingly, it doesn't complain about:

*(unsigned short *) (CURS_PAT_REG + 14 * 64) = 0xffff;

This driver uses raw memory writes to write to hardware registers.
Probably it should use writel() instead.

[1] mips64-linux-gnuabi64-gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1)
jazz_defconfig + CONFIG_64BIT=y

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2023-03-26 23:32    [W:0.062 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site