From: Krzysztof Kozlowski <krzk@kernel•org>
To: Geert Uytterhoeven <geert@linux-m68k•org>
Cc: Rich Felker <dalias@libc•org>, Jiri Slaby <jirislaby@gmail•com>,
"Michael S. Tsirkin" <mst@redhat•com>,
David Airlie <airlied@linux•ie>, Jason Wang <jasowang@redhat•com>,
DRI Development <dri-devel@lists•freedesktop.org>,
virtualization@lists•linux-foundation.org,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership•com>,
netdev <netdev@vger•kernel.org>,
Paul Mackerras <paulus@samba•org>,
Linux-Arch <linux-arch@vger•kernel.org>,
Dave Jiang <dave.jiang@intel•com>,
Yoshinori Sato <ysato@users•sourceforge.jp>,
Helge Deller <deller@gmx•de>,
Linux-sh list <linux-sh@vger•kernel.org>,
Alexey Brodkin <abrodkin@synopsys•com>,
Ben Skeggs <bskeggs@redhat•com>,
nouveau@lists•freedesktop.org, Dave Airlie <airlied@redhat•com>,
Matt Turner <mattst88@gmail•com>,
arcml <linux-snps-arc@lists•infradead.org>,
Nick Kossifidis <mickflemm@gmail•com>,
Allen Hubbe <allenbh@gmail•com>, Arnd Bergmann <arnd@arndb•de>,
alpha <linux-alpha@vger•kernel.org>,
Ivan Kokshaysky <ink@jurassic•park.msu.ru>,
Thomas Gleixner <tglx@linutronix•de>,
Mauro Carvalho Chehab <mchehab@kernel•org>,
Kalle Valo <kvalo@codeaurora•org>,
Richard Henderson <rth@twiddle•net>,
Parisc List <linux-parisc@vger•kernel.org>,
Vineet Gupta <vgupta@synopsys•com>,
linux-wireless <linux-wireless@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Luis Chamberlain <mcgrof@kernel•org>,
Daniel Vetter <daniel@ffwll•ch>, Jon Mason <jdmason@kudzu•us>,
linux-ntb@googlegroups•com,
Andrew Morton <akpm@linux-foundation•org>,
Linux Media Mailing List <linux-media@vger•kernel.org>,
linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
"David S. Miller" <davem@davemloft•net>
Subject: Re: [RFT 02/13] alpha: Constify ioreadX() iomem argument (as in generic implementation)
Date: Wed, 8 Jan 2020 10:07:32 +0100 [thread overview]
Message-ID: <20200108090732.GA10145@pi3> (raw)
In-Reply-To: <CAMuHMdXHhF6GhS1W8qS4j7Jv5YnxXjcRopT5QSA=+trc8qwFng@mail.gmail.com>
On Wed, Jan 08, 2020 at 09:10:06AM +0100, Geert Uytterhoeven wrote:
> Hi Krzysztof,
>
> On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski <krzk@kernel•org> wrote:
> > The ioreadX() helpers have inconsistent interface. On some architectures
> > void *__iomem address argument is a pointer to const, on some not.
> >
> > Implementations of ioreadX() do not modify the memory under the address
> > so they can be converted to a "const" version for const-safety and
> > consistency among architectures.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel•org>
>
> > --- a/arch/alpha/include/asm/io.h
> > +++ b/arch/alpha/include/asm/io.h
> > @@ -151,9 +151,9 @@ static inline void generic_##NAME(TYPE b, QUAL void __iomem *addr) \
> > alpha_mv.mv_##NAME(b, addr); \
> > }
> >
> > -REMAP1(unsigned int, ioread8, /**/)
> > -REMAP1(unsigned int, ioread16, /**/)
> > -REMAP1(unsigned int, ioread32, /**/)
> > +REMAP1(unsigned int, ioread8, const)
> > +REMAP1(unsigned int, ioread16, const)
> > +REMAP1(unsigned int, ioread32, const)
>
> If these would become "const volatile", there would no longer be a need
> for the last parameter of the REMAP1() macro.
>
> > REMAP1(u8, readb, const volatile)
> > REMAP1(u16, readw, const volatile)
> > REMAP1(u32, readl, const volatile)
>
> Same for REMAP2() macro below, for iowrite*().
Good point, thanks!
Best regards,
Krzysztof
next prev parent reply other threads:[~2020-01-08 9:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 16:52 [RFT 00/13] iomap: Constify ioreadX() iomem argument Krzysztof Kozlowski
2020-01-07 16:52 ` [RFT 01/13] iomap: Constify ioreadX() iomem argument (as in generic implementation) Krzysztof Kozlowski
2020-01-07 16:52 ` [RFT 02/13] alpha: " Krzysztof Kozlowski
2020-01-08 8:10 ` Geert Uytterhoeven
2020-01-08 9:07 ` Krzysztof Kozlowski [this message]
2020-01-07 16:53 ` [RFT 02/13] sh: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 03/13] alpha: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 03/13] sh: " Krzysztof Kozlowski
2020-01-07 17:08 ` Arnd Bergmann
2020-01-07 16:53 ` [RFT 04/13] parisc: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 05/13] powerpc: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 06/13] arc: " Krzysztof Kozlowski
2020-01-07 17:10 ` Arnd Bergmann
2020-01-07 16:53 ` [RFT 07/13] drm/mgag200: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 08/13] drm/nouveau: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 09/13] media: fsl-viu: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 10/13] net: wireless: ath5k: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 11/13] net: wireless: rtl818x: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 12/13] ntb: intel: " Krzysztof Kozlowski
2020-01-07 16:53 ` [RFT 13/13] virtio: pci: " Krzysztof Kozlowski
2020-01-08 8:07 ` [RFT 00/13] iomap: Constify ioreadX() iomem argument Geert Uytterhoeven
2020-01-08 8:12 ` Geert Uytterhoeven
2020-01-08 8:18 ` Krzysztof Kozlowski
2020-01-08 8:35 ` Christophe Leroy
2020-01-08 8:43 ` Geert Uytterhoeven
2020-01-08 8:48 ` Christophe Leroy
2020-01-08 17:39 ` David Laight
2020-01-08 8:44 ` Arnd Bergmann
2020-01-08 9:15 ` Krzysztof Kozlowski
2020-01-08 11:55 ` Arnd Bergmann
2020-01-08 8:15 ` Krzysztof Kozlowski
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=20200108090732.GA10145@pi3 \
--to=krzk@kernel$(echo .)org \
--cc=James.Bottomley@hansenpartnership$(echo .)com \
--cc=abrodkin@synopsys$(echo .)com \
--cc=airlied@linux$(echo .)ie \
--cc=airlied@redhat$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=allenbh@gmail$(echo .)com \
--cc=arnd@arndb$(echo .)de \
--cc=bskeggs@redhat$(echo .)com \
--cc=dalias@libc$(echo .)org \
--cc=daniel@ffwll$(echo .)ch \
--cc=dave.jiang@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=deller@gmx$(echo .)de \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=geert@linux-m68k$(echo .)org \
--cc=ink@jurassic$(echo .)park.msu.ru \
--cc=jasowang@redhat$(echo .)com \
--cc=jdmason@kudzu$(echo .)us \
--cc=jirislaby@gmail$(echo .)com \
--cc=kvalo@codeaurora$(echo .)org \
--cc=linux-alpha@vger$(echo .)kernel.org \
--cc=linux-arch@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-media@vger$(echo .)kernel.org \
--cc=linux-ntb@googlegroups$(echo .)com \
--cc=linux-parisc@vger$(echo .)kernel.org \
--cc=linux-sh@vger$(echo .)kernel.org \
--cc=linux-snps-arc@lists$(echo .)infradead.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mattst88@gmail$(echo .)com \
--cc=mcgrof@kernel$(echo .)org \
--cc=mchehab@kernel$(echo .)org \
--cc=mickflemm@gmail$(echo .)com \
--cc=mst@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nouveau@lists$(echo .)freedesktop.org \
--cc=paulus@samba$(echo .)org \
--cc=rth@twiddle$(echo .)net \
--cc=tglx@linutronix$(echo .)de \
--cc=vgupta@synopsys$(echo .)com \
--cc=virtualization@lists$(echo .)linux-foundation.org \
--cc=ysato@users$(echo .)sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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