From nobody Sat Jul 25 23:41:41 2026 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (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 A18E7281532 for ; Sat, 11 Jul 2026 14:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783781444; cv=none; b=B2pmxgxkO7F989+Zmk3GEIWq0TEMbSf1bsidOE7xD2GM5ETuOyihzyw2ld1Whzs2X8yWfnQoC+pCKtU2DIU++gkzAPdS4scxpG+EyeaNL0v4SQ64DncKKqyIEMC3xof1ZUmOmm+JyRf6YMJY47CWsmSDp6ofTT3jw3q8kns5LBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783781444; c=relaxed/simple; bh=TxAHOCI8HJUxNpgz6gqiyVWfmmv2mcGTZ0IO7ZVFrak=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DR8JHjoek3kfwvjuiht01MrL6v2WHUVikUqEAmQI9m9BKNzjvUL22sOMMUBVV3iuJx2D6C3C2gqnzBf2P4nXpy9pLUc/O/Xzqe7hyQn7LOb/co3YZ7fpdf85q39VBQ3nINgC03RqPgggxtY6FH5/d2rZNPqteD2maF9Yda6T/xk= 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=ipUz3N0p; arc=none smtp.client-ip=209.85.216.42 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="ipUz3N0p" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-38511175ad3so1586269a91.2 for ; Sat, 11 Jul 2026 07:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783781442; x=1784386242; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=KjJHYEJ+238MY0pZ1amwdjykbr/wm4kFMSYEYUTKcek=; b=ipUz3N0pM4oOfF3iSIGEEvurSklAgDCsSFc9lbrWlKBmUD6Z6kRnZv4x1hEwTqqFdO dLILS7BcM4wlGq7W2DD0rc2QNrGOdoC0ZGL83dZmwgp6ybrCTtuv8LwTAt7OJVdG4M6a dcGFNO0bjvrQwbWlQIHcRX7mrn5iQWncv3UqHgCLIjoRPlJVaXbp1HgZ3SSJVQ1ZE9ef rEi3qxxUFzsMW7UaWt2MvvKQPK5TcwCoNSRveBxkNWXPjgjyoCKBdOx6bWzCSKNdqezu KHpyysOKhEpMzw9WKdBZY6dqXGqND/kQSKx1yQKytSGiMByYbL8a6GbLlaeQ9LPmEn8T 7rHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783781442; x=1784386242; h=content-transfer-encoding:mime-version: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=Bi/J6E8gN9CkKyrXxEWjJjQ0C3tPPrciVufU5BX8rV8m8pZar1Q8kvAImo3EL+HBid H36FL/EPi2RsZglcOCjYIe/99JX74qN6fzgSOsNstdNMf6/9a/jDLdwC2FZF5Aycb63M qtrdyC/bY6BQNM5rpCPrp6/k2MoqjLz3/dujv1TXieEvs2sgcCKyq+4v0pgEfOdo/YYz KR22xuU4z2j2Nxc6+VOvyrHL1TmNUD2JRDqpJ/4lB+93Xcvb8098T4AwT59QN4fw53vN eHbpV0R2xKAHCFQZQYfkYeQfODMZB3qvphBXfkR+3ylCtwlmJ2SnIjpuyiQoM5V0iiv6 dzKQ== X-Forwarded-Encrypted: i=1; AHgh+RqEpdd5eMX85yZUzCOQm35QPLbMOpSduT9l7vRSMSv3ZOHn3WZN+q76nlKJ1bP+kNWU2NQqyyLtERIf19c=@vger.kernel.org X-Gm-Message-State: AOJu0YydUwTd50NgeB4nCvHjo0JRDiapRTr82akusPZFy1XeHrvD1caj fDA+goRyd4zjprnElkSestFjVKKiJ0pfoC+6/SImJBRW4unwQoy4zTg= X-Gm-Gg: AfdE7cmsAqH18jlbddXF9uXXeUzgvA6Jhdrk/Rea1JNOBj6KRbBvpG46vYOGNFlhwsa uxMupWXSQI3dkr2f5LZuSQTcvE1RpaFaKNltZq2tSsxbUzHni1KOzDnP4IpmWom0jiTxbM/dSdg S++K1ryF9zQXBwbLDHWrPCwQaB+M2YU5t7Did0sA+avr555MY8cG5MR48x+DndRqsi07FUAUd9W n2mrzPzlCmX6ChdaP0k5dixVDmOSjs9rN87H7m8uOuWE+UOWP0sf2+KcHyaTL4Vy13ILBtACKzO m0Hz5eQ89y42umQDKnXkeKYGugXAaaKWnXyoUNvuZanktuIO10X4yEKTG7eIH31xICQTzvWRlvg +TzhTSLLe5Apl9RrC0cuZuOMj2+CTlQsybnHIawKfpHWzC1U4WbbFqqg7hdLarjOdNs+O5RLmtt GAFOLHDZhg8hFIqQsKCIS36kX7+kvNrLhGQ7GW X-Received: by 2002:a17:90b:4a4b:b0:37f:e8d6:72c0 with SMTP id 98e67ed59e1d1-38dc73c3657mr3168007a91.1.1783781441952; Sat, 11 Jul 2026 07:50:41 -0700 (PDT) Received: from HARICS-M-4G70.cisco.com ([2001:420:c0e0:1002::60]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3118389d9bcsm42065865eec.20.2026.07.11.07.50.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 11 Jul 2026 07:50:41 -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:20:33 +0530 Message-ID: <20260711145033.39649-1-harish.cs.ss24@gmail.com> X-Mailer: git-send-email 2.50.1 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)