From patchwork Wed Jan 31 20:23:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Obst via B4 Relay X-Patchwork-Id: 194927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp4518dyc; Wed, 31 Jan 2024 12:28:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMSjSUrtOnxBNY75sxWEYGuRehORKfuTcov7SbsjK1Y0nKWVv5dKnNyH2uW7zBerrQVqat X-Received: by 2002:a05:622a:1304:b0:42a:ad44:22b0 with SMTP id v4-20020a05622a130400b0042aad4422b0mr5598375qtk.3.1706732936656; Wed, 31 Jan 2024 12:28:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706732936; cv=pass; d=google.com; s=arc-20160816; b=YgafNAj7K+vLPcP+DNYYERSmmgBMYDqHYYDEqwxF8VAXt5+k42utjcnpBWUfc59iRJ mBS0KyToeIGlx+bdUkjZG/d5sK6xKZLyGtfmx6xsfd2UjQtXL6UVI/i3Q8SyIT0LPz9q RCw6ODLPNTqGP+Z2lBM58ymCR26wJptmmYo/MU/LZUkML8pKZSRktDuVg8RgokgIjYzi KHJo84WsZqwICVVixB05T1DvbDe1X5mHVqLNwb98uvywyWFApLevjzTzkGWzga5cEZWY 6cFldN8Ch5CWEWSKIUli61OnPodi85oQ+LFuco5NCpMRIXj+rGyANITcjeVCuwGb8RoK Cu3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=GWSzQBCSeP76vvgq66i0aev7nX0zAQgicULAN6iChvQ=; fh=pnKxETUId2oPKBS0Qw1RnThJaXF0XpTUY9Xtgu1jxl4=; b=m166QQ4LGFHeQHx8S7AZhhY6L+PWHzxG1enNYWzuGA39F4oY2TetZh7+ACI5kzrmxz 3T+yVJ9e3TnLG8pQqS/SlMtOCVk7hd87NNhF7ZPsSZfHJOl/VozTHwKSw+EaDHajwUpM e9BNlv6hb4jiYa9/irHAb6MI/HaE1UD0VFn/Ywsnrw1REczKomN5urhNLwrhAZZ2M9Vw FFV31bc4n33CUQdwS2U0byG+kjmOvQ4I9SZKQLtEhGE7Kw9Crvv2y4DL2oB5UpipFsKd DqoF5VjGfyxU5rj57Eq8oXkW8duX/ZqncgYSUcxILGMgxwZ22C1oN6oHpi1IYqc04N/I 2PPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JBfhkEnS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47076-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47076-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCW4qEFYHbbDfYStKwzZ0gZ26IsYnl7qHTTeq2hY3nSivwd0XkXed/8GIM0YMyg8ou++Q63zKoUJG0Vk9q67pNi41f+mCQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u20-20020a05622a14d400b0042aa6c11445si7081391qtx.79.2024.01.31.12.28.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47076-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JBfhkEnS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47076-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47076-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6537A1C228F7 for ; Wed, 31 Jan 2024 20:28:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EA3B13EFEB; Wed, 31 Jan 2024 20:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JBfhkEnS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B92B778B6C; Wed, 31 Jan 2024 20:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732649; cv=none; b=Dqwsu62fUCz2AL5L3fWE0H8JRtH4zyk+L2Ym7i+s0/HPPQ8iQVwK6Tf/JSk+ArUk7Nijfp61WITp6nDt/ffpqK7PBnA9euyaBW2NLxAI4U9qFtYnBDeHaOXzEfeH9VOUyU/VRoZnjASycyNUS1A1JngBeIMkpeigmZ0PnOZ9LJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732649; c=relaxed/simple; bh=Z6DzNv6aKwU5F0iVgt7H+eG2SqQrz3L9funW8c2FQog=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZtgOtZOJhI3/cDqy0t+OUWuudTha+rghWkg/HSoD97Wf4zuyElWlzk95fY1bRqjRYn6Rjcm7OTn32aGh1BKPtMgjwSBzDhGz4LQw7pysWavOiILw1ZIc/RaSQY5HAXGph+f21jH8ag2gwS1Hm3WySnDCOCUXONYmvAZARmURmkM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JBfhkEnS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 3ED32C433A6; Wed, 31 Jan 2024 20:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706732649; bh=Z6DzNv6aKwU5F0iVgt7H+eG2SqQrz3L9funW8c2FQog=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=JBfhkEnSHeD17O6buGBZ8K+MTzx7xslYy0BFyd0LmELLO60pOr1ISHbdm5AXXlj1d +Y63vuak+bLpi3T4ykduf4l1sBSLlKXaQ0Myzfvsxb3wUvRwbioSQU6MTvKuU1EtpQ jRE5jm0Cns/wtGT4eButGtSQmiojaH4B6U17FsCDjmi4rQ/I6V4rmJvUIz5iBGYLTs UPwQGuHcqwdo3wbIpP20UhlymyVIhEzD0uO3Z5RYVLvANCBjDaB2IjaVsNGhC8668H Z1ZAIScccmEwArsteApeN3mJvnWHGwmeyTVIFS9X+PgHMLZAnmS8aeVYvElXRxZ8Fv ygAWcV3NrtgSQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EC0CC4828D; Wed, 31 Jan 2024 20:24:09 +0000 (UTC) From: Valentin Obst via B4 Relay Date: Wed, 31 Jan 2024 21:23:34 +0100 Subject: [PATCH v3 12/12] rust: locked_by: shorten doclink preview Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240131-doc-fixes-v3-v3-12-0c8af94ed7de@valentinobst.de> References: <20240131-doc-fixes-v3-v3-0-0c8af94ed7de@valentinobst.de> In-Reply-To: <20240131-doc-fixes-v3-v3-0-0c8af94ed7de@valentinobst.de> To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Valentin Obst , Trevor Gross , Martin Rodriguez Reboredo X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706732646; l=1666; i=kernel@valentinobst.de; s=20240131; h=from:subject:message-id; bh=sqg0B5Wr1bFP5Krb6u5ZgMS6Wtgf+9jYvaOmeO5jfXs=; b=lQBqbaRJYx0+ptyykohvXQroXhFbdrLF8+38IIQ+Mrgzdcc4iQGLoNEXfOVgcOP4WxwiMVtZ7 lHRemgJ/QGwD5JvssVna2L6r4kIbhLvEGdxnqRbd19Zmt64CVD0tjKM X-Developer-Key: i=kernel@valentinobst.de; a=ed25519; pk=3s7U8y0mqkaiurgHSQQTYWOo2tw5HgzCg5vnJVfw37Y= X-Endpoint-Received: by B4 Relay for kernel@valentinobst.de/20240131 with auth_id=124 X-Original-From: Valentin Obst Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789639195648055681 X-GMAIL-MSGID: 1789639195648055681 From: Valentin Obst Increases readability by removing `super::` from the link preview text. Signed-off-by: Valentin Obst Reviewed-by: Trevor Gross Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Alice Ryhl --- rust/kernel/sync/locked_by.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust/kernel/sync/locked_by.rs b/rust/kernel/sync/locked_by.rs index b17ee5cd98f3..babc731bd5f6 100644 --- a/rust/kernel/sync/locked_by.rs +++ b/rust/kernel/sync/locked_by.rs @@ -9,14 +9,17 @@ /// Allows access to some data to be serialised by a lock that does not wrap it. /// /// In most cases, data protected by a lock is wrapped by the appropriate lock type, e.g., -/// [`super::Mutex`] or [`super::SpinLock`]. [`LockedBy`] is meant for cases when this is not -/// possible. For example, if a container has a lock and some data in the contained elements needs +/// [`Mutex`] or [`SpinLock`]. [`LockedBy`] is meant for cases when this is not possible. +/// For example, if a container has a lock and some data in the contained elements needs /// to be protected by the same lock. /// /// [`LockedBy`] wraps the data in lieu of another locking primitive, and only allows access to it /// when the caller shows evidence that the 'external' lock is locked. It panics if the evidence /// refers to the wrong instance of the lock. /// +/// [`Mutex`]: super::Mutex +/// [`SpinLock`]: super::SpinLock +/// /// # Examples /// /// The following is an example for illustrative purposes: `InnerDirectory::bytes_used` is an