public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] um: fix incompatible argument type in iounmap()
@ 2025-04-09  6:11 FUJITA Tomonori
  2025-04-09 14:47 ` Miguel Ojeda
  0 siblings, 1 reply; 8+ messages in thread
From: FUJITA Tomonori @ 2025-04-09  6:11 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes, linux-um; +Cc: linux-kernel, rust-for-linux

Align iounmap() signature with other architectures.

This fixes the following build error on CONFIG_RUST enabled:

In file included from /home/fujita/git/linux-rust/rust/helpers/helpers.c:19:
/home/fujita/git/linux-rust/rust/helpers/io.c:12:10: error: passing 'volatile void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
   12 |         iounmap(addr);
      |                 ^~~~
/home/fujita/git/linux-rust/arch/um/include/asm/io.h:19:42: note: passing argument to parameter 'addr' here
   19 | static inline void iounmap(void __iomem *addr)
      |                                          ^
1 error generated.

Fixes: ce30d94e6855 ("rust: add `io::{Io, IoRaw}` base types")
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
 arch/um/include/asm/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/um/include/asm/io.h b/arch/um/include/asm/io.h
index 9ea42cc746d9..ce0e8cf4834d 100644
--- a/arch/um/include/asm/io.h
+++ b/arch/um/include/asm/io.h
@@ -16,7 +16,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
 
 #ifndef iounmap
 #define iounmap iounmap
-static inline void iounmap(void __iomem *addr)
+static inline void iounmap(volatile void __iomem *addr)
 {
 }
 #endif /* iounmap */

base-commit: c59026c0570a2a97ce2e7d5ae5e9c48fc841542b
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-10 13:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09  6:11 [PATCH v1] um: fix incompatible argument type in iounmap() FUJITA Tomonori
2025-04-09 14:47 ` Miguel Ojeda
2025-04-09 17:07   ` Geert Uytterhoeven
2025-04-09 17:30     ` Danilo Krummrich
2025-04-10 12:56       ` FUJITA Tomonori
2025-04-09 19:07     ` Arnd Bergmann
2025-04-10  7:30       ` Geert Uytterhoeven
2025-04-10 13:05         ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox