Skip to content

Commit 58184e9

Browse files
krzktorvalds
authored andcommitted
ntb: intel: constify ioreadX() iomem argument (as in generic implementation)
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Dave Jiang <[email protected]> Cc: Allen Hubbe <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Helge Deller <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Jason Wang <[email protected]> Cc: Jon Mason <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Matt Turner <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Rich Felker <[email protected]> Cc: Yoshinori Sato <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5ca6ad7 commit 58184e9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/ntb/hw/intel/ntb_hw_gen1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ int intel_ntb_peer_spad_write(struct ntb_dev *ntb, int pidx, int sidx,
12051205
ndev->peer_reg->spad);
12061206
}
12071207

1208-
static u64 xeon_db_ioread(void __iomem *mmio)
1208+
static u64 xeon_db_ioread(const void __iomem *mmio)
12091209
{
12101210
return (u64)ioread16(mmio);
12111211
}

drivers/ntb/hw/intel/ntb_hw_gen3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
#define GEN3_DB_TOTAL_SHIFT 33
9292
#define GEN3_SPAD_COUNT 16
9393

94-
static inline u64 gen3_db_ioread(void __iomem *mmio)
94+
static inline u64 gen3_db_ioread(const void __iomem *mmio)
9595
{
9696
return ioread64(mmio);
9797
}

drivers/ntb/hw/intel/ntb_hw_intel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ struct intel_ntb_dev;
103103
struct intel_ntb_reg {
104104
int (*poll_link)(struct intel_ntb_dev *ndev);
105105
int (*link_is_up)(struct intel_ntb_dev *ndev);
106-
u64 (*db_ioread)(void __iomem *mmio);
106+
u64 (*db_ioread)(const void __iomem *mmio);
107107
void (*db_iowrite)(u64 db_bits, void __iomem *mmio);
108108
unsigned long ntb_ctl;
109109
resource_size_t db_size;

0 commit comments

Comments
 (0)