Re: [PATCH] rust: Mark all from() for Error functions inline

From: Benno Lossin

Date: Fri Mar 20 2026 - 04:17:51 EST


On Fri Mar 20, 2026 at 2:18 AM CET, alistair23 wrote:
> From: Alistair Francis <alistair.francis@xxxxxxx>
>
> Mark all of the existing
>
> impl From<...> for Error {
> fn from(err: ...) -> Self {
> ...
> }
> }
>
> functions as `#[inline]`
>
> Signed-off-by: Alistair Francis <alistair.francis@xxxxxxx>
> ---
> rust/kernel/alloc/kvec/errors.rs | 3 +++
> rust/kernel/error.rs | 6 ++++++
> rust/kernel/ptr/projection.rs | 2 +-
> rust/kernel/xarray.rs | 1 +
> rust/pin-init/examples/error.rs | 2 ++
> rust/pin-init/examples/pthread_mutex.rs | 2 ++

Please split the pin-init changes into a separate patch.

Also note that I prefer to take patches to pin-init upstream:

https://github.com/rust-for-linux/pin-init

I'm also open to picking it from the mailing list if you don't want to
go to GitHub.

Cheers,
Benno

> rust/syn/error.rs | 1 +
> 7 files changed, 16 insertions(+), 1 deletion(-)