RE: [PATCH v2 5/9] arc: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Alexey Brodkin
Hi Krzysztof, > 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

Re: [PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Thomas Zimmermann
Hi Am 08.01.20 um 21:05 schrieb Krzysztof Kozlowski: > 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

Re: [PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Arnd Bergmann
On Wed, Jan 8, 2020 at 9:05 PM Krzysztof Kozlowski wrote: > > The ioreadX() and ioreadX_rep() 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

[PATCH v2 3/9] ntb: intel: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 9/9] net: wireless: ath5k: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 5/9] arc: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 8/9] media: fsl-viu: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 7/9] drm/nouveau: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 4/9] virtio: pci: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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

[PATCH v2 0/9] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Krzysztof Kozlowski
Hi, Changes since v1 https://lore.kernel.org/lkml/1578415992-24054-1-git-send-email-k...@kernel.org/ 1. Constify also ioreadX_rep() and mmio_insX(), 2. Squash lib+alpha+powerpc+parisc+sh into one patch for bisectability, 3. Add Geert's review, 4. Re-order patches so all optional

[PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
The ioreadX() and ioreadX_rep() 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

RE: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread David Laight
From: Christophe Leroy > Sent: 08 January 2020 08:49 ... > And as pointed by Arnd, the volatile is really only necessary for the > dereference itself, should the arch use dereferencing. I've had trouble with some versions of gcc and reading of 'volatile unsigned char *'. It tended to follow the

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Arnd Bergmann
On Wed, Jan 8, 2020 at 10:15 AM Krzysztof Kozlowski wrote: > > The __force-cast that removes the __iomem here also means that > > the 'volatile' keyword could be dropped from the argument list, > > as it has no real effect any more, but then there are a few drivers > > that mark their iomem

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Krzysztof Kozlowski
On Wed, Jan 08, 2020 at 09:44:36AM +0100, Arnd Bergmann wrote: > On Wed, Jan 8, 2020 at 9:36 AM Christophe Leroy > wrote: > > Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : > > > On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven > > > wrote: > > > I'll add to this one also changes to

Re: [RFT 02/13] alpha: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Krzysztof Kozlowski
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 wrote: > > The ioreadX() helpers have inconsistent interface. On some architectures > > void *__iomem address argument is a pointer to const, on some not. >

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Christophe Leroy
Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven wrote: Hi Krzysztof, On Wed, Jan 8, 2020 at 9:07 AM Geert Uytterhoeven wrote: On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski wrote: The ioread8/16/32() and others have inconsistent

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Christophe Leroy
Hi Geert, Le 08/01/2020 à 09:43, Geert Uytterhoeven a écrit : Hi Christophe, On Wed, Jan 8, 2020 at 9:35 AM Christophe Leroy wrote: Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven wrote: On Wed, Jan 8, 2020 at 9:07 AM Geert Uytterhoeven

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Arnd Bergmann
On Wed, Jan 8, 2020 at 9:36 AM Christophe Leroy wrote: > Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : > > On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven > > wrote: > > I'll add to this one also changes to ioreadX_rep() and add another > > patch for volatile for reads and writes. I

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Geert Uytterhoeven
Hi Christophe, On Wed, Jan 8, 2020 at 9:35 AM Christophe Leroy wrote: > Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : > > On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven > > wrote: > >> On Wed, Jan 8, 2020 at 9:07 AM Geert Uytterhoeven > >> wrote: > >>> On Tue, Jan 7, 2020 at 5:53 PM

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Krzysztof Kozlowski
On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven wrote: > > Hi Krzysztof, > > On Wed, Jan 8, 2020 at 9:07 AM Geert Uytterhoeven > wrote: > > On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski wrote: > > > The ioread8/16/32() and others have inconsistent interface among the > > > architectures:

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Krzysztof Kozlowski
On Wed, 8 Jan 2020 at 09:08, Geert Uytterhoeven wrote: > > Hi Krzysztof, > > On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski wrote: > > The ioread8/16/32() and others have inconsistent interface among the > > architectures: some taking address as const, some not. > > > > It seems there is

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Geert Uytterhoeven
Hi Krzysztof, On Wed, Jan 8, 2020 at 9:07 AM Geert Uytterhoeven wrote: > On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski wrote: > > The ioread8/16/32() and others have inconsistent interface among the > > architectures: some taking address as const, some not. > > > > It seems there is

Re: [RFT 02/13] alpha: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Geert Uytterhoeven
Hi Krzysztof, On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski 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 >

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Geert Uytterhoeven
Hi Krzysztof, On Tue, Jan 7, 2020 at 5:53 PM Krzysztof Kozlowski wrote: > The ioread8/16/32() and others have inconsistent interface among the > architectures: some taking address as const, some not. > > It seems there is nothing really stopping all of them to take > pointer to const. Shouldn't