* [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation)
[not found] <20200108200528.4614-1-krzk@kernel.org>
@ 2020-01-08 20:05 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-08 20:05 UTC (permalink / raw)
To: Richard Henderson, Ivan Kokshaysky, Matt Turner, Alexey Brodkin,
Vineet Gupta, James E.J. Bottomley, Helge Deller,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Yoshinori Sato, Rich Felker, Dave Airlie, David Airlie,
Daniel Vetter, Ben Skeggs, Mauro Carvalho Chehab, Jiri Slaby,
Nick Kossifidis, Luis Chamberlain, Kalle Valo, David S. Miller,
Dave Jiang
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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Changes since v1:
1. Add Geert's review.
---
drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h b/drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h
index 7948a2da195a..2ff00800d45b 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h
@@ -150,17 +150,17 @@ void rtl8180_write_phy(struct ieee80211_hw *dev, u8 addr, u32 data);
void rtl8180_set_anaparam(struct rtl8180_priv *priv, u32 anaparam);
void rtl8180_set_anaparam2(struct rtl8180_priv *priv, u32 anaparam2);
-static inline u8 rtl818x_ioread8(struct rtl8180_priv *priv, u8 __iomem *addr)
+static inline u8 rtl818x_ioread8(struct rtl8180_priv *priv, const u8 __iomem *addr)
{
return ioread8(addr);
}
-static inline u16 rtl818x_ioread16(struct rtl8180_priv *priv, __le16 __iomem *addr)
+static inline u16 rtl818x_ioread16(struct rtl8180_priv *priv, const __le16 __iomem *addr)
{
return ioread16(addr);
}
-static inline u32 rtl818x_ioread32(struct rtl8180_priv *priv, __le32 __iomem *addr)
+static inline u32 rtl818x_ioread32(struct rtl8180_priv *priv, const __le32 __iomem *addr)
{
return ioread32(addr);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation)
[not found] <20200108200528.4614-3-krzk@kernel.org>
@ 2020-01-26 15:11 ` Kalle Valo
2020-01-26 15:11 ` Kalle Valo
2020-01-26 15:11 ` Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-01-26 15:11 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Henderson, Ivan Kokshaysky, Matt Turner, Alexey Brodkin,
Vineet Gupta, James E.J. Bottomley, Helge Deller,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Yoshinori Sato, Rich Felker, Dave Airlie, David Airlie,
Daniel Vetter, Ben Skeggs, Mauro Carvalho Chehab, Jiri Slaby,
Nick Kossifidis, Luis
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>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
I assume this and patch 9 are going via some other tree so dropping them
from my patchwork queue.
--
https://patchwork.kernel.org/patch/11324461/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation)
[not found] <20200108200528.4614-3-krzk@kernel.org>
2020-01-26 15:11 ` [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation) Kalle Valo
2020-01-26 15:11 ` Kalle Valo
@ 2020-01-26 15:11 ` Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-01-26 15:11 UTC (permalink / raw)
Cc: Rich Felker, Jiri Slaby, Geert Uytterhoeven, Michael S. Tsirkin,
David Airlie, Benjamin Herrenschmidt, Jason Wang, dri-devel,
virtualization, James E.J. Bottomley, netdev, Paul Mackerras,
linux-arch, Dave Jiang, Yoshinori Sato, Michael Ellerman,
Helge Deller, linux-sh, Alexey Brodkin, Krzysztof Kozlowski,
Ben Skeggs, nouveau, Dave Airlie, Matt Turner
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>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
I assume this and patch 9 are going via some other tree so dropping them
from my patchwork queue.
--
https://patchwork.kernel.org/patch/11324461/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation)
[not found] <20200108200528.4614-3-krzk@kernel.org>
2020-01-26 15:11 ` [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation) Kalle Valo
@ 2020-01-26 15:11 ` Kalle Valo
2020-01-26 15:11 ` Kalle Valo
2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-01-26 15:11 UTC (permalink / raw)
Cc: Rich Felker, Jiri Slaby, Geert Uytterhoeven, Michael S. Tsirkin,
David Airlie, Jason Wang, dri-devel, virtualization,
James E.J. Bottomley, netdev, Paul Mackerras, linux-arch,
Dave Jiang, Yoshinori Sato, Helge Deller, linux-sh,
Alexey Brodkin, Krzysztof Kozlowski, Ben Skeggs, nouveau,
Dave Airlie, Matt Turner, linux-snps-arc, Nick Kossifidis,
Allen Hubbe <alle>
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>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
I assume this and patch 9 are going via some other tree so dropping them
from my patchwork queue.
--
https://patchwork.kernel.org/patch/11324461/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-26 15:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200108200528.4614-3-krzk@kernel.org>
2020-01-26 15:11 ` [PATCH v2 2/9] net: wireless: rtl818x: Constify ioreadX() iomem argument (as in generic implementation) Kalle Valo
2020-01-26 15:11 ` Kalle Valo
2020-01-26 15:11 ` Kalle Valo
[not found] <20200108200528.4614-1-krzk@kernel.org>
2020-01-08 20:05 ` Krzysztof Kozlowski
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).