[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=Grg+T-c0+TxcyubHj4kvHPQKiVm3AZp5DgeUVXsitEQ@mail.gmail.com>
Date: Tue, 15 Apr 2025 18:28:23 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-um@...ts.infradead.org, richard@....at, anton.ivanov@...bridgegreys.com,
johannes@...solutions.net, geert@...ux-m68k.org, logang@...tatee.com,
sbates@...thlin.com, dakr@...nel.org, dinguyen@...nel.org, arnd@...db.de
Subject: Re: [PATCH v2] rust: helpers: Remove volatile qualifier from io helpers
On Sat, Apr 12, 2025 at 2:54 AM FUJITA Tomonori
<fujita.tomonori@...il.com> wrote:
>
> Remove the `volatile` qualifier used with __iomem in helper functions
> in io.c. These helper functions are just wrappers around the
> corresponding accessors so they are unnecessary.
>
> This fixes the following UML build error with 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@...il.com>
I don't particularly like having different signatures than the other
side (since we could e.g. eventually have a check that they match
etc.), but given v1 it seems they could also be eventually gone from
the C side anyway.
Cc: stable, I assume, too?
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists