[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2LEgDM53bc0bHP6@pollux>
Date: Wed, 18 Dec 2024 13:48:00 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Jimmy Ostler <jtostler1@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Wedson Almeida Filho <walmeida@...rosoft.com>,
Filipe Xavier <felipe_life@...e.com>,
Valentin Obst <kernel@...entinobst.de>,
Daniel Sedlak <daniel@...lak.dev>,
Alex Mantel <alexmantel93@...lbox.org>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] rust: error: Update 'stack_try_pin_init' example
On Tue, Dec 17, 2024 at 04:23:11PM -0800, Jimmy Ostler wrote:
> Change documentation imports to use `kernel::alloc::AllocError`,
> because `KBox::new()` now returns that, instead of the 'core'
> `AllocError`.
>
> Signed-off-by: Jimmy Ostler <jtostler1@...il.com>
Reviewed-by: Danilo Krummrich <dakr@...nel.org>
> ---
> rust/kernel/init.rs | 22 ++++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
> index 347049df556b..3d099908dbd5 100644
> --- a/rust/kernel/init.rs
> +++ b/rust/kernel/init.rs
> @@ -290,9 +290,16 @@ macro_rules! stack_pin_init {
> ///
> /// ```rust,ignore
> /// # #![expect(clippy::disallowed_names)]
> -/// # use kernel::{init, pin_init, stack_try_pin_init, init::*, sync::Mutex, new_mutex};
> +/// # use kernel::{init,
> +/// # pin_init,
> +/// # stack_try_pin_init,
> +/// # init::*,
> +/// # sync::Mutex,
> +/// # new_mutex,
> +/// # alloc::AllocError
> +/// # };
> /// # use macros::pin_data;
> -/// # use core::{alloc::AllocError, pin::Pin};
> +/// # use core::pin::Pin;
> /// #[pin_data]
> /// struct Foo {
> /// #[pin]
> @@ -316,9 +323,16 @@ macro_rules! stack_pin_init {
> ///
> /// ```rust,ignore
> /// # #![expect(clippy::disallowed_names)]
> -/// # use kernel::{init, pin_init, stack_try_pin_init, init::*, sync::Mutex, new_mutex};
> +/// # use kernel::{init,
> +/// # pin_init,
> +/// # stack_try_pin_init,
> +/// # init::*,
> +/// # sync::Mutex,
> +/// # new_mutex,
> +/// # alloc::AllocError
> +/// # };
> /// # use macros::pin_data;
> -/// # use core::{alloc::AllocError, pin::Pin};
> +/// # use core::pin::Pin;
> /// #[pin_data]
> /// struct Foo {
> /// #[pin]
> --
> 2.47.1
>
Powered by blists - more mailing lists