From: Boqun Feng <boqun@kernel.org>
To: Harish C S <harish.cs.ss24@gmail.com>
Cc: ojeda@kernel.org, gary@garyguo.net, aliceryhl@google.com,
lyude@redhat.com, daniel.almeida@collabora.com,
work@onurozkan.dev, bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu, dakr@kernel.org,
tamird@kernel.org, acourbot@nvidia.com,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v2] rust: sync: improve `Arc` documentation links
Date: Sun, 9 Aug 2026 13:29:42 -0700 [thread overview]
Message-ID: <anjjNlRqHgDpnJjV@tardis.local> (raw)
In-Reply-To: <20260711144721.39185-1-harish.cs.ss24@gmail.com>
On Sat, Jul 11, 2026 at 08:17:21PM +0530, Harish C S wrote:
> The `Arc` documentation has a few mentions that do not follow the
> surrounding style: a plain `Arc` without an intra-doc link and a
> lower-case "arc".
>
> Use intra-doc links for rustdoc references to `Arc` and spell internal
> comments consistently as `Arc`, matching nearby docs.
>
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1240
> Signed-off-by: Harish C S <harish.cs.ss24@gmail.com>
Thanks!
Acked-by: Boqun Feng <boqun@kernel.org>
Regards,
Boqun
> ---
> Changes in v2:
> - Use full name in the patch author and Signed-off-by trailer.
>
> rust/kernel/sync/arc.rs | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/rust/kernel/sync/arc.rs b/rust/kernel/sync/arc.rs
> index 5ac4961b7cd2..76a153e01283 100644
> --- a/rust/kernel/sync/arc.rs
> +++ b/rust/kernel/sync/arc.rs
> @@ -154,7 +154,7 @@ impl<T: ?Sized> ArcInner<T> {
> ///
> /// # Safety
> ///
> - /// `ptr` must have been returned by a previous call to [`Arc::into_raw`], and the `Arc` must
> + /// `ptr` must have been returned by a previous call to [`Arc::into_raw`], and the [`Arc`] must
> /// not yet have been destroyed.
> unsafe fn container_of(ptr: *const T) -> NonNull<ArcInner<T>> {
> let refcount_layout = Layout::new::<Refcount>();
> @@ -253,7 +253,7 @@ unsafe fn from_inner(inner: NonNull<ArcInner<T>>) -> Self {
>
> /// Convert the [`Arc`] into a raw pointer.
> ///
> - /// The raw pointer has ownership of the refcount that this Arc object owned.
> + /// The raw pointer has ownership of the refcount that this [`Arc`] object owned.
> pub fn into_raw(self) -> *const T {
> let ptr = self.ptr.as_ptr();
> core::mem::forget(self);
> @@ -261,7 +261,7 @@ pub fn into_raw(self) -> *const T {
> unsafe { core::ptr::addr_of!((*ptr).data) }
> }
>
> - /// Return a raw pointer to the data in this arc.
> + /// Return a raw pointer to the data in this [`Arc`].
> pub fn as_ptr(this: &Self) -> *const T {
> let ptr = this.ptr.as_ptr();
>
> @@ -305,7 +305,7 @@ pub fn ptr_eq(this: &Self, other: &Self) -> bool {
>
> /// Converts this [`Arc`] into a [`UniqueArc`], or destroys it if it is not unique.
> ///
> - /// When this destroys the `Arc`, it does so while properly avoiding races. This means that
> + /// When this destroys the [`Arc`], it does so while properly avoiding races. This means that
> /// this method will never call the destructor of the value.
> ///
> /// # Examples
> @@ -345,11 +345,11 @@ pub fn into_unique_or_drop(this: Self) -> Option<Pin<UniqueArc<T>>> {
>
> // If the refcount reaches a non-zero value, then we have destroyed this `Arc` and will
> // return without further touching the `Arc`. If the refcount reaches zero, then there are
> - // no other arcs, and we can create a `UniqueArc`.
> + // no other `Arc`s, and we can create a `UniqueArc`.
> if refcount.dec_and_test() {
> refcount.set(1);
>
> - // INVARIANT: We own the only refcount to this arc, so we may create a `UniqueArc`. We
> + // INVARIANT: We own the only refcount to this `Arc`, so we may create a `UniqueArc`. We
> // must pin the `UniqueArc` because the values was previously in an `Arc`, and they pin
> // their values.
> Some(Pin::from(UniqueArc {
> --
> 2.50.1 (Apple Git-155)
next prev parent reply other threads:[~2026-08-09 20:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 17:51 [PATCH] rust: sync: improve `Arc` documentation links Harish-CS
2026-07-10 11:06 ` Miguel Ojeda
2026-07-14 18:24 ` lyude
2026-07-14 19:11 ` Miguel Ojeda
2026-07-11 14:47 ` [PATCH v2] " Harish C S
2026-08-09 20:29 ` Boqun Feng [this message]
2026-08-10 4:54 ` Miguel Ojeda
-- strict thread matches above, loose matches on Subject: below --
2026-07-11 14:50 Harish C S
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=anjjNlRqHgDpnJjV@tardis.local \
--to=boqun@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=harish.cs.ss24@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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