Rust for Linux List
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Shankari Anand" <shankari.ak0208@gmail.com>,
	<rust-for-linux@vger.kernel.org>
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>,
	"Danilo Krummrich" <dakr@kernel.org>
Subject: Re: [PATCH] rust: move ARef and AlwaysRefCounted to sync::aref
Date: Tue, 24 Jun 2025 01:25:59 +0200	[thread overview]
Message-ID: <DAUAUTGMKB4Y.2NS5D54LX5JIA@kernel.org> (raw)
In-Reply-To: <20250623192530.266103-1-shankari.ak0208@gmail.com>

On Mon Jun 23, 2025 at 9:25 PM CEST, Shankari Anand wrote:
> Move the definitions of `ARef` and `AlwaysRefCounted` from `types.rs`
> to a new file `sync/aref.rs`.
> Define the corresponding `aref` module under `rust/kernel/sync.rs`.
> These types are better grouped in `sync` with other synchronization primitives.
>
> To avoid breaking existing imports, they are re-exported from `types.rs`.
> Drop unused imports `mem::ManuallyDrop`, `ptr::NonNull` from `types.rs`,
> they are now only used in `sync/aref.rs`, where they are already imported.
>
> Suggested-by: Benno Lossin <lossin@kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1173
> Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com>
> ---
>
> The moving patch and updating patch are split as discussed in https://github.com/Rust-for-Linux/linux/issues/1173
> A follow-up patch will update all the call sites to import `ARef` and `AlwaysRefCounted`
> directly from `sync::aref` instead of `types`.

Ah, I meant that you can just send the two patches in a single series.
No need to wait for anything (it's easier to review the two distinct
changes, that's why I thought it's a good idea to split them).

> Fixes were also made to intra-doc links: unresolved references to `inc_ref` and `dec_ref`
> were updated to use `AlwaysRefCounted::inc_ref` and `AlwaysRefCounted::dec_ref`.
>
> ---
>  rust/kernel/sync.rs      |   1 +
>  rust/kernel/sync/aref.rs | 170 +++++++++++++++++++++++++++++++++++++++
>  rust/kernel/types.rs     | 156 ++---------------------------------
>  3 files changed, 176 insertions(+), 151 deletions(-)
>  create mode 100644 rust/kernel/sync/aref.rs

This doesn't apply to `rust-next` or `v6.16-rc3`, what base did you use?
When creating `.patch` files for sending, please use `--base` to make
git add your base at the bottom.

---
Cheers,
Benno

  reply	other threads:[~2025-06-23 23:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 19:25 [PATCH] rust: move ARef and AlwaysRefCounted to sync::aref Shankari Anand
2025-06-23 23:25 ` Benno Lossin [this message]
2025-06-24  8:58   ` Shankari Anand

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=DAUAUTGMKB4Y.2NS5D54LX5JIA@kernel.org \
    --to=lossin@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=shankari.ak0208@gmail.com \
    --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