From: David Laight <David.Laight@ACULAB.COM>
To: 'Thomas Zimmermann' <tzimmermann@suse.de>,
"deller@gmx.de" <deller@gmx.de>,
"geert@linux-m68k.org" <geert@linux-m68k.org>,
"javierm@redhat.com" <javierm@redhat.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"vgupta@kernel.org" <vgupta@kernel.org>,
"chenhuacai@kernel.org" <chenhuacai@kernel.org>,
"kernel@xen0n.name" <kernel@xen0n.name>,
"davem@davemloft.net" <davem@davemloft.net>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"sam@ravnborg.org" <sam@ravnborg.org>,
"suijingfeng@loongson.cn" <suijingfeng@loongson.cn>
Cc: "linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
"linux-m68k@lists.linux-m68k.org"
<linux-m68k@lists.linux-m68k.org>,
"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>,
kernel test robot <lkp@intel.com>,
"Artur Rojek" <contact@artur-rojek.eu>
Subject: RE: [PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address
Date: Fri, 12 May 2023 11:16:30 +0000 [thread overview]
Message-ID: <c25758dd7b4a4563b0d33c751da8cf6d@AcuMS.aculab.com> (raw)
In-Reply-To: <20230512102444.5438-2-tzimmermann@suse.de>
From: Thomas Zimmermann
> Sent: 12 May 2023 11:25
>
> Cast I/O offsets to pointers to use them with I/O functions. The I/O
> functions expect pointers of type 'volatile void __iomem *', but the
> offsets are plain integers. Build warnings are
>
> ../drivers/video/fbdev/hitfb.c: In function 'hitfb_accel_wait':
> ../arch/x86/include/asm/hd64461.h:18:33: warning: passing argument 1 of 'fb_readw' makes pointer
> from integer without a cast [-Wint-conversion]
> 18 | #define HD64461_IO_OFFSET(x) (HD64461_IOBASE + (x))
> | ^~~~~~~~~~~~~~~~~~~~~~
...
> 52 | static inline u16 fb_readw(const volatile void __iomem *addr)
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>
> This patch only fixes the build warnings. It's not clear if the I/O
> offsets can legally be passed to the I/O helpers. It was apparently
> broken in 2007 when custom inw()/outw() helpers got removed by
> commit 34a780a0afeb ("sh: hp6xx pata_platform support."). Fixing the
> driver would require setting the I/O base address.
Did you try changing the definition of HD64461_IOBASE to include
a (volatile void __iomem *) cast?
A lot less churn...
I'm guessing that 'sh' deosn't have in/out instructions so this
is something that is always mapped at a fixed kernel virtual address?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2023-05-12 11:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 10:24 [PATCH v7 0/7] fbdev: Move framebuffer I/O helpers to <asm/fb.h> Thomas Zimmermann
2023-05-12 10:24 ` [PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address Thomas Zimmermann
2023-05-12 11:16 ` David Laight [this message]
2023-05-12 11:45 ` Thomas Zimmermann
2023-05-16 17:44 ` Helge Deller
2023-05-12 10:24 ` [PATCH v7 2/7] fbdev/matrox: Remove trailing whitespaces Thomas Zimmermann
2023-05-12 10:24 ` [PATCH v7 3/7] ipu-v3: Include <linux/io.h> Thomas Zimmermann
2023-05-12 10:24 ` [PATCH v7 4/7] fbdev: Include <linux/io.h> in various drivers Thomas Zimmermann
2023-05-12 10:24 ` [PATCH v7 5/7] fbdev: Include <linux/fb.h> instead of <asm/fb.h> Thomas Zimmermann
2023-05-12 10:24 ` [PATCH v7 6/7] fbdev: Move framebuffer I/O helpers into <asm/fb.h> Thomas Zimmermann
2023-05-12 10:24 ` [PATCH v7 7/7] fbdev: Rename fb_mem*() helpers Thomas Zimmermann
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=c25758dd7b4a4563b0d33c751da8cf6d@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=contact@artur-rojek.eu \
--cc=daniel@ffwll.ch \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=javierm@redhat.com \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=lkp@intel.com \
--cc=loongarch@lists.linux.dev \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=suijingfeng@loongson.cn \
--cc=tzimmermann@suse.de \
--cc=vgupta@kernel.org \
/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).