path: root/drivers/mailbox
diff options
authorKrzysztof Kozlowski <>2020-08-14 17:32:07 -0700
committerLinus Torvalds <>2020-08-14 19:56:57 -0700
commit8f28ca6bd8211214faf717677bbffe375c2a6072 (patch)
treebec1c1ff0a05930955ce56b5769711c116f636ce /drivers/mailbox
parentf9e7ff9c6fc758b6f25674a9a4451db30344ce1e (diff)
iomap: constify ioreadX() iomem argument (as in generic implementation)
Patch series "iomap: Constify ioreadX() iomem argument", v3. 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. This patch (of 4): 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 consistency among architectures. [ sh: clk: fix assignment from incompatible pointer type for ioreadX()] Link: [ fix drivers/mailbox/bcm-pdc-mailbox.c] Link: Suggested-by: Geert Uytterhoeven <> Signed-off-by: Krzysztof Kozlowski <> Signed-off-by: Andrew Morton <> Reviewed-by: Geert Uytterhoeven <> Reviewed-by: Arnd Bergmann <> Cc: Richard Henderson <> Cc: Ivan Kokshaysky <> Cc: Matt Turner <> Cc: "James E.J. Bottomley" <> Cc: Helge Deller <> Cc: Michael Ellerman <> Cc: Benjamin Herrenschmidt <> Cc: Paul Mackerras <> Cc: Yoshinori Sato <> Cc: Rich Felker <> Cc: Kalle Valo <> Cc: "David S. Miller" <> Cc: Jakub Kicinski <> Cc: Dave Jiang <> Cc: Jon Mason <> Cc: Allen Hubbe <> Cc: "Michael S. Tsirkin" <> Cc: Jason Wang <> Link: Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'drivers/mailbox')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-mailbox.c
index c10a9318a4b7..53945ca5d785 100644
--- a/drivers/mailbox/bcm-pdc-mailbox.c
+++ b/drivers/mailbox/bcm-pdc-mailbox.c
@@ -679,7 +679,7 @@ pdc_receive(struct pdc_state *pdcs)
/* read last_rx_curr from register once */
pdcs->last_rx_curr =
- (ioread32(&pdcs->rxregs_64->status0) &
+ (ioread32((const void __iomem *)&pdcs->rxregs_64->status0) &
do {