* [PATCH] rust: sync: improve `Arc` documentation links
@ 2026-07-08 17:51 Harish-CS
2026-07-10 11:06 ` Miguel Ojeda
2026-07-11 14:47 ` [PATCH v2] " Harish C S
0 siblings, 2 replies; 8+ messages in thread
From: Harish-CS @ 2026-07-08 17:51 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Harish-CS, Boqun Feng, Gary Guo, Alice Ryhl, Lyude Paul,
Daniel Almeida, Onur Özkan, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
Tamir Duberstein, Alexandre Courbot, linux-kernel, rust-for-linux
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-CS <harish.cs.ss24@gmail.com>
---
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 {
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: sync: improve `Arc` documentation links
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-11 14:47 ` [PATCH v2] " Harish C S
1 sibling, 1 reply; 8+ messages in thread
From: Miguel Ojeda @ 2026-07-10 11:06 UTC (permalink / raw)
To: Harish-CS
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Alice Ryhl, Lyude Paul,
Daniel Almeida, Onur Özkan, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
Tamir Duberstein, Alexandre Courbot, linux-kernel, rust-for-linux
On Wed, Jul 8, 2026 at 7:51 PM Harish-CS <harish.cs.ss24@gmail.com> 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-CS <harish.cs.ss24@gmail.com>
Thanks for the patch! It looks good to me.
One question that I am supposed to ask: is Harish-CS a "known identity"?
https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
Normally, the full legal name is used (which may be what you wrote, in
which case it is fine).
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] rust: sync: improve `Arc` documentation links
2026-07-08 17:51 [PATCH] rust: sync: improve `Arc` documentation links Harish-CS
2026-07-10 11:06 ` Miguel Ojeda
@ 2026-07-11 14:47 ` Harish C S
2026-08-09 20:29 ` Boqun Feng
2026-08-10 4:54 ` Miguel Ojeda
1 sibling, 2 replies; 8+ messages in thread
From: Harish C S @ 2026-07-11 14:47 UTC (permalink / raw)
To: ojeda
Cc: boqun, gary, aliceryhl, lyude, daniel.almeida, work, bjorn3_gh,
lossin, a.hindborg, tmgross, dakr, tamird, acourbot, linux-kernel,
rust-for-linux
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>
---
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)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2] rust: sync: improve `Arc` documentation links
@ 2026-07-11 14:50 Harish C S
0 siblings, 0 replies; 8+ messages in thread
From: Harish C S @ 2026-07-11 14:50 UTC (permalink / raw)
To: ojeda
Cc: boqun, gary, aliceryhl, lyude, daniel.almeida, work, bjorn3_gh,
lossin, a.hindborg, tmgross, dakr, tamird, acourbot, linux-kernel,
rust-for-linux
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>
---
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)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: sync: improve `Arc` documentation links
2026-07-10 11:06 ` Miguel Ojeda
@ 2026-07-14 18:24 ` lyude
2026-07-14 19:11 ` Miguel Ojeda
0 siblings, 1 reply; 8+ messages in thread
From: lyude @ 2026-07-14 18:24 UTC (permalink / raw)
To: Miguel Ojeda, Harish-CS
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Alice Ryhl, Daniel Almeida,
Onur Özkan, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Trevor Gross, Danilo Krummrich,
Tamir Duberstein, Alexandre Courbot, linux-kernel, rust-for-linux
On Fri, 2026-07-10 at 13:06 +0200, Miguel Ojeda wrote:
> On Wed, Jul 8, 2026 at 7:51 PM Harish-CS <harish.cs.ss24@gmail.com>
> wrote:
> Thanks for the patch! It looks good to me.
>
> One question that I am supposed to ask: is Harish-CS a "known
> identity"?
>
>
> https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
>
> Normally, the full legal name is used (which may be what you wrote,
> in
> which case it is fine).
JFYI: it also doesn't actually have to be your legal name, it just
needs to be consistent and traceable to your online identity generally.
Though if you are using your real name /and/ you have a last name it's
probably better to use the full first/last name. Of course, if your
language doesn't have last names generally - feel free to just let us
know.
>
> Cheers,
> Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rust: sync: improve `Arc` documentation links
2026-07-14 18:24 ` lyude
@ 2026-07-14 19:11 ` Miguel Ojeda
0 siblings, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2026-07-14 19:11 UTC (permalink / raw)
To: lyude
Cc: Harish-CS, Miguel Ojeda, Boqun Feng, Gary Guo, Alice Ryhl,
Daniel Almeida, Onur Özkan, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
Tamir Duberstein, Alexandre Courbot, linux-kernel, rust-for-linux
On Tue, Jul 14, 2026 at 8:24 PM <lyude@redhat.com> wrote:
>
> JFYI: it also doesn't actually have to be your legal name, it just
> needs to be consistent and traceable to your online identity generally.
Yeah, I didn't say it has to be, just that normally it is.
The reason is that if it is not the legal name, then it may not be as
simple to accept the patch, especially lately for maintainers in some
countries.
So for contributors that are OK confirming publicly that it is their
legal name, it is the simplest approach :(
(For small patches it is not a big worry, but hopefully the
contributor will end up contributing larger changes.)
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] rust: sync: improve `Arc` documentation links
2026-07-11 14:47 ` [PATCH v2] " Harish C S
@ 2026-08-09 20:29 ` Boqun Feng
2026-08-10 4:54 ` Miguel Ojeda
1 sibling, 0 replies; 8+ messages in thread
From: Boqun Feng @ 2026-08-09 20:29 UTC (permalink / raw)
To: Harish C S
Cc: ojeda, gary, aliceryhl, lyude, daniel.almeida, work, bjorn3_gh,
lossin, a.hindborg, tmgross, dakr, tamird, acourbot, linux-kernel,
rust-for-linux
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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] rust: sync: improve `Arc` documentation links
2026-07-11 14:47 ` [PATCH v2] " Harish C S
2026-08-09 20:29 ` Boqun Feng
@ 2026-08-10 4:54 ` Miguel Ojeda
1 sibling, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2026-08-10 4:54 UTC (permalink / raw)
To: Harish C S
Cc: ojeda, boqun, gary, aliceryhl, lyude, daniel.almeida, work,
bjorn3_gh, lossin, a.hindborg, tmgross, dakr, tamird, acourbot,
linux-kernel, rust-for-linux
On Sat, Jul 11, 2026 at 4:47 PM Harish C S <harish.cs.ss24@gmail.com> 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>
Applied to `rust-next` -- thanks everyone!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-08-10 4:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-08-10 4:54 ` Miguel Ojeda
-- strict thread matches above, loose matches on Subject: below --
2026-07-11 14:50 Harish C S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox