From nobody Sat Jul 25 23:41:39 2026 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF8782030A for ; Sat, 11 Jul 2026 14:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783781252; cv=none; b=M1OkOJhh6pm2lzj6FAAfaW9NOaCSuEhkQF26WdvtzZGre2LY34G2mPNdyuY+5NaqKP0kbAD5NwGm0pWhz/DUVeHr398nKIkx7oXtpqd4GMYao8CYjIBn/7gUECgUnYl45KO5O3gViZvmuuG5e3Y+QFgNtlSFhZ30lQBwdePqmXU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783781252; c=relaxed/simple; bh=TxAHOCI8HJUxNpgz6gqiyVWfmmv2mcGTZ0IO7ZVFrak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SiZ/RqBs2KwkqqdT0TJzRl+RWtpStC2HWPLqeVHWf1vRxKPH3Xk9D9HAXfzphsuUBsrFk6Rik6qiTINOBhPFZhmsaN/HIFwTipZitKic7cY9U7ZtzDoz0QzNoJHnv5B4FRcqqlvqiawM3YgTtXVOfkMSwybROCu/KTVfOv/aaN0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hyd8kLhG; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hyd8kLhG" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-37df72c9984so3171956a91.3 for ; Sat, 11 Jul 2026 07:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783781250; x=1784386050; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=KjJHYEJ+238MY0pZ1amwdjykbr/wm4kFMSYEYUTKcek=; b=hyd8kLhGr6bAlZiqL7wsS/XhELDml6STsYliZyuYr6n/kFzDSjtE+/w93d0eqLi00L nv2Hj4KLVYAAxTsYzuPiFXXlrDU2s5aL1JFSfM2md6s1eEZmXOaQ68UVX38J9LLT1vN5 2QAtQUOBfM6ZYMuplEaX3HqJmIbs1CtT89tF5zb+lh6qVI0NR6jb8q+3s8DRkvMDVVD9 COvED4rJjp3JvahURSC0OVDni1AiLK0TnPQ3paHjfL6OnepTgl43JDLrT6ugj2w6MdOw iaKI1vp+4FJdSJ6zs+BXCm86Nc0WF6WvF9c0E00XMZscx+D96fq3kXc7PU0szKkkjvam VGCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783781250; x=1784386050; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=KjJHYEJ+238MY0pZ1amwdjykbr/wm4kFMSYEYUTKcek=; b=Imp0qjj/D+3bsHUyyaVM7ZfQxFHLIWvRYfL+eiLFusjKWwhzSKZRbORYwZhtITH6bA 1c7RU7YP22naXdIGvzXUCdZBA0DsTVV0hIka9huO1wBL4pOONnXL3LF5BqAgLy5T1vyd eg3T6rqdsQec08twNAwy6/tCdoia2piEqGCaaAToC7PwgCtVtB3ThQsL4MREz19GbLGM nwRy5cbICkJ0wuAzW3yD+3RdqsuoFi0O3VHaNj1LRUby/UEO7ZQnEu0mJQ4BQNCSQhMy 8F1HNDUO9SRqHeboPgW40mKdXG1MM58MQ3OT/jM2JU6z05qYvpWentQJBQC2zQz/sdbf EsIg== X-Forwarded-Encrypted: i=1; AHgh+RrKvRnfXw5auJ2MU909p8r9BBEqzeJcLQcaGoKg/09Y4JWvoN/3b6ZV7TGwvwNczkbXZW1FJjdFgkWqTBo=@vger.kernel.org X-Gm-Message-State: AOJu0YzJdZo77hLbME/LZAe3G/Q0lOkdT0z/cF9HEZFpna5ClT2jeCf8 dwr2yf3LXtuzNIWHCGvjZt3GTb0ccYSnAPTi0SYStKPtarVECoBh6J8= X-Gm-Gg: AfdE7ckvtYbvmtxNzw+LwbXVGbckZIsDYpkimdSUMNgfAYmASWDoQ3MOottsy7WKPHe 44zFb1VvTf4J7BlkizqBf+pnNi0x7lLTsEJNKcSPgM811UxDowcnrhmpd7oHC7QBVPkYRFwgCBN KWrZbRYKTt9rJw01aiaMFSKSr5W8SktwDGCRXEQENVmBV+EAn2w/+eSgOauCbxOQCErcU6AVeYn R88oPPnjeZChGkRodE+p/NV97XT9Soe+HrE2ZCrfHanP3pBRAf5VX0w/EwqSrhcj0zdUvGdFrAm 5HSnzMwrc7xvrmaVgIW62hC5t4yv4XXAttjktN5jeSG+JuANAOl02eVhhO5/0KXLoEC6SKXQrmw CTV9wSOJ4OQY7AAYoGBF/tqWYH7wSRISaDc3qiQXvewvboXbUfKu/9s0vTix97axcAu8Ig5jZ1o XcLcHbCGbE/LqND3TQ+CJGHFaOVMIcx64fBTKU X-Received: by 2002:a17:90b:4a4e:b0:36d:689a:cb27 with SMTP id 98e67ed59e1d1-38dc77ee812mr3079624a91.24.1783781249545; Sat, 11 Jul 2026 07:47:29 -0700 (PDT) Received: from HARICS-M-4G70.cisco.com ([2001:420:c0e0:1002::60]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31174ac14f2sm55367633eec.27.2026.07.11.07.47.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 11 Jul 2026 07:47:28 -0700 (PDT) From: Harish C S To: ojeda@kernel.org Cc: boqun@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: [PATCH v2] rust: sync: improve `Arc` documentation links Date: Sat, 11 Jul 2026 20:17:21 +0530 Message-ID: <20260711144721.39185-1-harish.cs.ss24@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260708175119.18051-1-harish.cs.ss24@gmail.com> References: <20260708175119.18051-1-harish.cs.ss24@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Link: https://github.com/Rust-for-Linux/linux/issues/1240 Signed-off-by: Harish C S --- 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 ArcInner { /// /// # Safety /// - /// `ptr` must have been returned by a previous call to [`Arc::into_ra= w`], and the `Arc` must + /// `ptr` must have been returned by a previous call to [`Arc::into_ra= w`], and the [`Arc`] must /// not yet have been destroyed. unsafe fn container_of(ptr: *const T) -> NonNull> { let refcount_layout =3D Layout::new::(); @@ -253,7 +253,7 @@ unsafe fn from_inner(inner: NonNull>) -> Se= lf { =20 /// 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`] ob= ject owned. pub fn into_raw(self) -> *const T { let ptr =3D 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) } } =20 - /// 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 =3D this.ptr.as_ptr(); =20 @@ -305,7 +305,7 @@ pub fn ptr_eq(this: &Self, other: &Self) -> bool { =20 /// Converts this [`Arc`] into a [`UniqueArc`], or destroys it if it i= s not unique. /// - /// When this destroys the `Arc`, it does so while properly avoiding r= aces. 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>> { =20 // If the refcount reaches a non-zero value, then we have destroye= d this `Arc` and will // return without further touching the `Arc`. If the refcount reac= hes 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); =20 - // 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 ma= y 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 { --=20 2.50.1 (Apple Git-155)