public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fiona Behrens <me@kloenk.dev>
To: Benno Lossin <benno.lossin@proton.me>
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>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 19/22] rust: pin-init: miscellaneous synchronization with the user-space version
Date: Thu, 13 Mar 2025 12:24:33 +0100	[thread overview]
Message-ID: <m2o6y5xjf2.fsf@kloenk.dev> (raw)
In-Reply-To: <20250308110339.2997091-20-benno.lossin@proton.me> (Benno Lossin's message of "Sat, 08 Mar 2025 11:05:27 +0000")

Benno Lossin <benno.lossin@proton.me> writes:

> Remove the last differences between the kernel version and the
> user-space version.
>
> Signed-off-by: Benno Lossin <benno.lossin@proton.me>
> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
> Tested-by: Andreas Hindborg <a.hindborg@kernel.org>

Reviewed-by: Fiona Behrens <me@kloenk.dev>

> ---
>  rust/pin-init/internal/src/lib.rs | 5 ++---
>  rust/pin-init/src/__internal.rs   | 2 +-
>  rust/pin-init/src/lib.rs          | 2 --
>  3 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/rust/pin-init/internal/src/lib.rs b/rust/pin-init/internal/src/lib.rs
> index 30e145f80bc0..babe5e878550 100644
> --- a/rust/pin-init/internal/src/lib.rs
> +++ b/rust/pin-init/internal/src/lib.rs
> @@ -14,6 +14,8 @@
>  //
>  // Remove once we have `proc_macro2` in the kernel.
>  #![allow(clippy::useless_conversion)]
> +// Documentation is done in the pin-init crate instead.
> +#![allow(missing_docs)]
>  
>  use proc_macro::TokenStream;
>  
> @@ -30,19 +32,16 @@
>  mod pinned_drop;
>  mod zeroable;
>  
> -#[allow(missing_docs)]
>  #[proc_macro_attribute]
>  pub fn pin_data(inner: TokenStream, item: TokenStream) -> TokenStream {
>      pin_data::pin_data(inner.into(), item.into()).into()
>  }
>  
> -#[allow(missing_docs)]
>  #[proc_macro_attribute]
>  pub fn pinned_drop(args: TokenStream, input: TokenStream) -> TokenStream {
>      pinned_drop::pinned_drop(args.into(), input.into()).into()
>  }
>  
> -#[allow(missing_docs)]
>  #[proc_macro_derive(Zeroable)]
>  pub fn derive_zeroable(input: TokenStream) -> TokenStream {
>      zeroable::derive(input.into()).into()
> diff --git a/rust/pin-init/src/__internal.rs b/rust/pin-init/src/__internal.rs
> index 7f7744d48575..557b5948cddc 100644
> --- a/rust/pin-init/src/__internal.rs
> +++ b/rust/pin-init/src/__internal.rs
> @@ -14,7 +14,7 @@
>  ///
>  /// [nomicon]: https://doc.rust-lang.org/nomicon/subtyping.html
>  /// [this table]: https://doc.rust-lang.org/nomicon/phantom-data.html#table-of-phantomdata-patterns
> -pub(super) type Invariant<T> = PhantomData<fn(*mut T) -> *mut T>;
> +pub(crate) type Invariant<T> = PhantomData<fn(*mut T) -> *mut T>;
>  
>  /// Module-internal type implementing `PinInit` and `Init`.
>  ///
> diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs
> index a00288133ae3..45880ffa81bb 100644
> --- a/rust/pin-init/src/lib.rs
> +++ b/rust/pin-init/src/lib.rs
> @@ -349,8 +349,6 @@
>  ///     }
>  /// }
>  /// ```
> -///
> -/// [`pin_init!`]: crate::pin_init
>  pub use ::pin_init_internal::pin_data;
>  
>  /// Used to implement `PinnedDrop` safely.

  reply	other threads:[~2025-03-13 11:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250308110339.2997091-1-benno.lossin@proton.me>
2025-03-08 11:03 ` [PATCH v2 01/22] rust: init: disable doctests Benno Lossin
2025-03-08 11:04 ` [PATCH v2 02/22] rust: move pin-init API into its own directory Benno Lossin
2025-03-08 11:04 ` [PATCH v2 03/22] rust: add extensions to the pin-init crate and move relevant documentation there Benno Lossin
2025-03-18 11:32   ` Andreas Hindborg
2025-03-08 11:04 ` [PATCH v2 04/22] rust: pin-init: move proc-macro documentation into pin-init crate Benno Lossin
2025-03-18 11:33   ` Andreas Hindborg
2025-03-19 13:14     ` Miguel Ojeda
2025-03-08 11:04 ` [PATCH v2 05/22] rust: pin-init: change examples to the user-space version Benno Lossin
2025-03-08 11:04 ` [PATCH v2 06/22] rust: pin-init: call `try_[pin_]init!` from `[pin_]init!` instead of `__init_internal!` Benno Lossin
2025-03-08 11:04 ` [PATCH v2 07/22] rust: pin-init: move the default error behavior of `try_[pin_]init` Benno Lossin
2025-03-08 11:04 ` [PATCH v2 08/22] rust: pin-init: move `InPlaceInit` and impls of `InPlaceWrite` into the kernel crate Benno Lossin
2025-03-18 11:37   ` Andreas Hindborg
2025-03-08 11:04 ` [PATCH v2 09/22] rust: pin-init: move impl `Zeroable` for `Opaque` and `Option<KBox<T>>` " Benno Lossin
2025-03-13 11:16   ` Fiona Behrens
2025-03-08 11:04 ` [PATCH v2 10/22] rust: add `ZeroableOption` and implement it instead of `Zeroable` for `Option<Box<T, A>>` Benno Lossin
2025-03-08 11:04 ` [PATCH v2 11/22] rust: pin-init: fix documentation links Benno Lossin
2025-03-18 11:38   ` Andreas Hindborg
2025-03-08 11:04 ` [PATCH v2 12/22] rust: pin-init: remove kernel-crate dependency Benno Lossin
2025-03-08 11:04 ` [PATCH v2 13/22] rust: pin-init: change the way the `paste!` macro is called Benno Lossin
2025-03-08 11:05 ` [PATCH v2 14/22] rust: add pin-init crate build infrastructure Benno Lossin
2025-03-08 11:05 ` [PATCH v2 15/22] rust: make pin-init its own crate Benno Lossin
2025-03-18 11:40   ` Andreas Hindborg
2025-03-08 11:05 ` [PATCH v2 16/22] rust: pin-init: add `std` and `alloc` support from the user-space version Benno Lossin
2025-03-08 11:05 ` [PATCH v2 17/22] rust: pin-init: synchronize documentation with " Benno Lossin
2025-03-08 11:05 ` [PATCH v2 18/22] rust: pin-init: internal: synchronize with " Benno Lossin
2025-03-13 11:22   ` Fiona Behrens
2025-03-08 11:05 ` [PATCH v2 19/22] rust: pin-init: miscellaneous synchronization with the " Benno Lossin
2025-03-13 11:24   ` Fiona Behrens [this message]
2025-03-08 11:05 ` [PATCH v2 20/22] rust: pin-init: add miscellaneous files from " Benno Lossin
2025-03-08 11:05 ` [PATCH v2 21/22] rust: pin-init: re-enable doctests Benno Lossin
2025-03-08 11:05 ` [PATCH v2 22/22] MAINTAINERS: add entry for the `pin-init` crate Benno Lossin

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=m2o6y5xjf2.fsf@kloenk.dev \
    --to=me@kloenk.dev \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox