All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: Jimmy Ostler <jtostler1@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Wedson Almeida Filho" <walmeida@microsoft.com>,
	"Filipe Xavier" <felipe_life@live.com>,
	"Valentin Obst" <kernel@valentinobst.de>,
	"Daniel Sedlak" <daniel@sedlak.dev>,
	"Alex Mantel" <alexmantel93@mailbox.org>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] rust: error: Update 'stack_try_pin_init' example
Date: Wed, 18 Dec 2024 13:48:00 +0100	[thread overview]
Message-ID: <Z2LEgDM53bc0bHP6@pollux> (raw)
In-Reply-To: <1f19375654fa5ef4d9bc086177f05b112470ca6d.1734477232.git.jtostler1@gmail.com>

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@gmail.com>

Reviewed-by: Danilo Krummrich <dakr@kernel.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
> 

  reply	other threads:[~2024-12-18 12:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18  0:23 [PATCH v3 0/3] rust: add kunit doctest with doc fixes Jimmy Ostler
2024-12-18  0:23 ` [PATCH v3 1/3] rust: error: Change `LayoutError` to internal Jimmy Ostler
2024-12-18  0:57   ` Miguel Ojeda
2024-12-18 12:43     ` Danilo Krummrich
2024-12-20  6:15       ` Jimmy Ostler
2024-12-18  0:23 ` [PATCH v3 2/3] rust: error: Update 'stack_try_pin_init' example Jimmy Ostler
2024-12-18 12:48   ` Danilo Krummrich [this message]
2024-12-18  0:23 ` [PATCH v3 3/3] rust: alloc: Add doctest for `ArrayLayout` Jimmy Ostler
2024-12-18 12:48   ` Danilo Krummrich

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=Z2LEgDM53bc0bHP6@pollux \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=alexmantel93@mailbox.org \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel@sedlak.dev \
    --cc=felipe_life@live.com \
    --cc=gary@garyguo.net \
    --cc=jtostler1@gmail.com \
    --cc=kernel@valentinobst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=walmeida@microsoft.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.