[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a3e368c5-3b4c-fe05-394b-50d1a1c01389@gmx.de>
Date: Sun, 15 Jan 2023 21:46:21 +0100
From: Helge Deller <deller@....de>
To: Geert Uytterhoeven <geert@...ux-m68k.org>, xurui <xurui@...inos.cn>
Cc: linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, trivial@...nel.org,
linux-mips@...r.kernel.org
Subject: Re: [PATCH] fbdev/g364fb: Fix a compilation issue
Hi Xurui,
On 1/9/23 11:04, Geert Uytterhoeven wrote:
> This time with the new linux-mips mailing list address...
>
> On Mon, Jan 9, 2023 at 11:01 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>
>> Hi Xurui,
>>
>> On Thu, Jan 5, 2023 at 10:45 AM xurui <xurui@...inos.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@...inos.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.
Xurui, I'll drop this patch from fbdev git tree for now.
Please check if the driver can be converted to writel() or similiar.
Thanks,
Helge
>> [1] mips64-linux-gnuabi64-gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1)
>> jazz_defconfig + CONFIG_64BIT=y
Powered by blists - more mailing lists