From: Helge Deller <deller@gmx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>, xurui <xurui@kylinos.cn>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, trivial@kernel.org,
linux-mips@vger.kernel.org
Subject: Re: [PATCH] fbdev/g364fb: Fix a compilation issue
Date: Sun, 15 Jan 2023 21:46:21 +0100 [thread overview]
Message-ID: <a3e368c5-3b4c-fe05-394b-50d1a1c01389@gmx.de> (raw)
In-Reply-To: <CAMuHMdVdCBxZ39BbtLDPeiMK9BK4M0W5hynrYLFx6+ibunyxGw@mail.gmail.com>
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@linux-m68k.org> wrote:
>>
>> 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.
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
next prev parent reply other threads:[~2023-01-15 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 9:40 xurui
2023-01-09 8:09 ` Helge Deller
2023-01-09 10:01 ` Geert Uytterhoeven
2023-01-09 10:04 ` Geert Uytterhoeven
2023-01-15 20:46 ` Helge Deller [this message]
2023-01-05 9:44 xurui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3e368c5-3b4c-fe05-394b-50d1a1c01389@gmx.de \
--to=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=trivial@kernel.org \
--cc=xurui@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®