All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-um@lists.infradead.org, richard@nod.at,
	anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net,
	geert@linux-m68k.org, logang@deltatee.com, sbates@raithlin.com,
	dinguyen@kernel.org, miguel.ojeda.sandonis@gmail.com,
	arnd@arndb.de
Subject: Re: [PATCH v2] rust: helpers: Remove volatile qualifier from io helpers
Date: Mon, 14 Apr 2025 23:24:29 +0200	[thread overview]
Message-ID: <Z_19DaVwN2TRt_nG@cassiopeiae> (raw)
In-Reply-To: <20250412005341.157150-1-fujita.tomonori@gmail.com>

On Sat, Apr 12, 2025 at 09:53:41AM +0900, FUJITA Tomonori 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@gmail.com>

Reviewed-by: Danilo Krummrich <dakr@kernel.org>

@Miguel: This originally landed through driver-core, but I guess subsequent
patches should go through the Rust tree.


  reply	other threads:[~2025-04-14 21:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-12  0:53 [PATCH v2] rust: helpers: Remove volatile qualifier from io helpers FUJITA Tomonori
2025-04-14 21:24 ` Danilo Krummrich [this message]
2025-04-15 16:28 ` Miguel Ojeda
2025-04-15 16:53   ` Arnd Bergmann
2025-04-15 17:29     ` Miguel Ojeda
2025-04-15 19:14 ` Miguel Ojeda
2025-04-15 21:13   ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_19DaVwN2TRt_nG@cassiopeiae \
    --to=dakr@kernel.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=arnd@arndb.de \
    --cc=dinguyen@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=logang@deltatee.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=richard@nod.at \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sbates@raithlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.