Commit fe0580ac authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Linus Torvalds
Browse files

virtio: pci: 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: default avatarKrzysztof Kozlowski <>
Signed-off-by: default avatarAndrew Morton <>
Reviewed-by: default avatarGeert Uytterhoeven <>
Cc: Allen Hubbe <>
Cc: Arnd Bergmann <>
Cc: Benjamin Herrenschmidt <>
Cc: Dave Jiang <>
Cc: "David S. Miller" <>
Cc: Geert Uytterhoeven <>
Cc: Helge Deller <>
Cc: Ivan Kokshaysky <>
Cc: Jakub Kicinski <>
Cc: "James E.J. Bottomley" <>
Cc: Jason Wang <>
Cc: Jon Mason <>
Cc: Kalle Valo <>
Cc: Matt Turner <>
Cc: Michael Ellerman <>
Cc: "Michael S. Tsirkin" <>
Cc: Paul Mackerras <>
Cc: Richard Henderson <>
Cc: Rich Felker <>
Cc: Yoshinori Sato <>

Signed-off-by: default avatarLinus Torvalds <>
parent 58184e95
......@@ -27,16 +27,16 @@
* method, i.e. 32-bit accesses for 32-bit fields, 16-bit accesses
* for 16-bit fields and 8-bit accesses for 8-bit fields.
static inline u8 vp_ioread8(u8 __iomem *addr)
static inline u8 vp_ioread8(const u8 __iomem *addr)
return ioread8(addr);
static inline u16 vp_ioread16 (__le16 __iomem *addr)
static inline u16 vp_ioread16 (const __le16 __iomem *addr)
return ioread16(addr);
static inline u32 vp_ioread32(__le32 __iomem *addr)
static inline u32 vp_ioread32(const __le32 __iomem *addr)
return ioread32(addr);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment