From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 34F353ACF0B for ; Wed, 8 Jul 2026 17:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783533090; cv=none; b=JPJtKyWopJeTIcd1iVmOCwAK7pUdIskYNQ3O8NEBoCUCh2x1iAqk6fcVmn8Zm1Om9cM/wMl5RXbXfg4ZVZnCLlTYTF6UztbdIsYdaIiZWvaMansx2Nc4uKfa0U+V4YdJqsH5saRgsA/QtBXEa1uA+O3ZcWT+6wHIMbgWL7te+lU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783533090; c=relaxed/simple; bh=IpgvUANgAhfD6lZYzPF2w2u9gG68v73hlGQgOQNt358=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oA7o4f1BlXdAvQSzv3yv9Znm1XTyRbjcT0BJABmI1spEzXHZ9ZwcFDysJOTN4nVq0tcPSfEBM9bFWFCWgHCXuA7bYRut4sExve12zr63KQI1l7cZl8QRd9sBsDYnVRFL4G769cAloSj039jPKoTnh2vPBUN3fvxR6PMpR4irVxI= 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=TU41JGJ5; arc=none smtp.client-ip=209.85.208.43 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="TU41JGJ5" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-697bd21fdc2so1736084a12.1 for ; Wed, 08 Jul 2026 10:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783533087; x=1784137887; 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=UjTZZD313ojYcs089TFb+HIC3d6T20qOffMkuqQnjpQ=; b=TU41JGJ5ZuDa2IIh5dWvaOF/Jcx46I1PfYXJiabs+gI4Rx/QZHEkaWCmeA7me1KPvz jDNA+IDZjd1w4DdZePsiIlZoegHvhsbf1cy+ijSr2iNBkOUVKDyAvpCOi5xKpX3AU3Qc o2DRz4sWRiqxsq3XEql5WyG5BTZJV6/rOvvtRr2bduSLZC+ifATu43SFpOpLcLl6yS7K RO0D736FAzbcnD1ZCywV8nsXvpiX6hp9KlpRKdwMtPVX4auwx4xEFqWfbZB3N2Ic9TvC laklVKi2ixWCxRgmkk3BUsaz9nNnnELBmGcImxvaWy9gx+Finm2CIX9vMkxNjB3nWULl aTKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783533087; x=1784137887; 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=UjTZZD313ojYcs089TFb+HIC3d6T20qOffMkuqQnjpQ=; b=Hr00ehcQzL7W2slcd5QdjolkyD/ho8BZUzCHpuSkZwFn8tklZv3ZsX82z116rOwyCJ g6c2L5Yf5dNLm+4ewlI0mnMmlZHgN4yuZvE4yJWlt9uUMW6yfW3l8RgbgckaBwwMBnmz wnyEZ5Khda6UBmFDzhSgf+qd5NjygAt4yOYnZXnHW75TxZ0YXBh0xNxVK5h4LJpeBLU9 WO0jRu6yxjLpOw7iXdIjqnEjY0oF0oHEYwpe95XwefxxIf1/fMnNWB490KwkGZXQRIBa JlqYgHGUoVeZPOd1g5/ndxYN0F/SjQv6tLB21DNU0d57tREFm5qjlxx70ElNPLcMjch1 bXxg== X-Forwarded-Encrypted: i=1; AHgh+RqCodwbCMeVDaXrna+bEi6RkwDS1ihhOSz09KYooDvnYskAa68tbAo9J6kiBRGjr0K8MXw2WZ4IsQ+CIlc=@vger.kernel.org X-Gm-Message-State: AOJu0YzL1F4qMywk+5DoaBCGDeF1zyjOumFoMHBeNzgFttKqS16VntMX mybJFJqkH3TZfsqtD2/6CY9f1Zkvri6gPlvmhJ2AqNtrgwpZx+UlY2AwS3tlArBFtg== X-Gm-Gg: AfdE7cmYdosVdTWK63FiUvurNvaA1U5YkjR7czLA9O7THCUnw5iKRHo+eG1wQR/lDwA px/HtX9aHg4rXfvZLxMriAbe4jbqpE2JMz4XxJBJKBgL5jXK0McPjeNLUoVmVOAOOQP8hKK8h8a aceerVD5GP9VcrTi3WI6zrAdJWnqukPePjSTp1iPVZEr2o+auQBuOMhDWhZPIBbmA04lVq1BNaK xKoB25lq3f8nU05qNCjMt73aaJX7eKGmRUkB7XnQORU6WFKcNfWRExI7qkiJSEW6qEsww6zt3Qh O1QwWzvMfBLxFOI+dcjJPoRAwva0LvQUWFNf8Tz6SGGQgot0Ji8BYjfT9XjZIbzSPEnPnwyKrj1 /GyVWo1I7VfpFKGki+7sCazyUMkDmsfBuj6zA4mNAEa1A7pNs7UdCTv10t8v5NKZHfOW128EjNq Ff7xGCPkWqcrLX1aX7BgbvmBh9L2SAPtU7v5yZnhuOye85Dg== X-Received: by 2002:a05:6402:3816:b0:69a:bfa:cb1c with SMTP id 4fb4d7f45d1cf-69ab44b42c0mr1721116a12.31.1783533087039; Wed, 08 Jul 2026 10:51:27 -0700 (PDT) Received: from HARICS-M-4G70.cisco.com ([2001:420:c0c0:1002::7]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69a9c4a4027sm3438323a12.29.2026.07.08.10.51.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 Jul 2026 10:51:26 -0700 (PDT) From: Harish-CS To: Miguel Ojeda Cc: Harish-CS , Boqun Feng , Gary Guo , Alice Ryhl , Lyude Paul , Daniel Almeida , =?UTF-8?q?Onur=20=C3=96zkan?= , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Tamir Duberstein , Alexandre Courbot , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: [PATCH] rust: sync: improve `Arc` documentation links Date: Wed, 8 Jul 2026 23:21:19 +0530 Message-ID: <20260708175119.18051-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: 8bit 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-CS --- 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_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> { let refcount_layout = Layout::new::(); @@ -253,7 +253,7 @@ unsafe fn from_inner(inner: NonNull>) -> 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>> { // 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)