From: Geert Uytterhoeven <geert@linux-m68k.org>
To: xurui <xurui@kylinos.cn>
Cc: deller@gmx.de, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
trivial@kernel.org,
Linux MIPS Mailing List <linux-mips@linux-mips.org>
Subject: Re: [PATCH] fbdev/g364fb: Fix a compilation issue
Date: Mon, 9 Jan 2023 11:01:22 +0100 [thread overview]
Message-ID: <CAMuHMdX174erGgrCUBv2WdX67H=mig-hi=SOdeMJ=0__thC_fw@mail.gmail.com> (raw)
In-Reply-To: <20230105094039.1474255-1-xurui@kylinos.cn>
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
next prev parent reply other threads:[~2023-01-09 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 9:40 [PATCH] fbdev/g364fb: Fix a compilation issue xurui
2023-01-09 8:09 ` Helge Deller
2023-01-09 10:01 ` Geert Uytterhoeven [this message]
2023-01-09 10:04 ` Geert Uytterhoeven
2023-01-15 20:46 ` Helge Deller
-- strict thread matches above, loose matches on Subject: below --
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='CAMuHMdX174erGgrCUBv2WdX67H=mig-hi=SOdeMJ=0__thC_fw@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.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;
as well as URLs for NNTP newsgroup(s).