Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1895831rdb; Wed, 31 Jan 2024 12:25:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyfp4egEDcV+DO+56FhJ/aRizxDQk941NA6XlkkL+eAmmoTOdGQXTJTcT1cHzmJOiCkWgZ X-Received: by 2002:a05:6870:ac13:b0:210:cac2:4419 with SMTP id kw19-20020a056870ac1300b00210cac24419mr2990408oab.38.1706732733626; Wed, 31 Jan 2024 12:25:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706732733; cv=pass; d=google.com; s=arc-20160816; b=TkdBPSQyuWXHF83c4zcoyfYhH7ITtLx9e4XQov6h7Rt7R5u/LN6tP4NmVpZYYgQt9f JKoJfuJgEZ6p31s5tb5BWky648KfAp+ECOR1g4+jW76lCDuCYAFM6uiNsuxRX/5wGrfo GzJv5zQHvAeMtDDAlCMakqvLiK4T7fe7l/eJeV8asj0h1iYRZ4417qiyMA2Jzbw8dPtM ern8fbcWmGCDpZr+cOT1Zkv/Z4HA3d7oSeKyp8o4Tg+bGkd8amT5UBl5TipLK7zShJUt SQ3bz93M+bi1NwA9/xNNrX1pupoBbzNptsV9HTUphPq4VWsEpAkrjNkxHu4EZngwsAlk fRVA== 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=MKQLwRB71coZp5N6n4prkas4FrmuRkkyL+t8JlE84eU=; fh=7KKaFRn1KU8uH9w3NiCAyPt+7BVctDwM05Ja3qVcDZs=; b=XumhhDmoqYaqGqSHNI++DP1hXlOJT0QCF53Djjxa/UifyzLiVjO7pEUPNIpTNTSMGg Y7lOLbnnn1/2sHiHJbownzPAFQAZoyouyD2wja30WVz+O8j7UnCrGoQyzAo10sJTnF1l wn46MG5aLE+DNy8vvnd1Fi4m4hoaEMwyPimDCnaQTaXsSZgfrD5yAqoFP3pp6cmIp7Km VDDgYaKCXCoaY9R/9KjFKpgFSBQiTlFezQcyB08Lqx0vmi7ePFexgkC2E7coMThwX5h4 MUJJx2I9lRHQ5Pzv3TvcarEqp72mj56lrwF699q2OTGhbRM5ukkKx2Aq1HM5CE07C563 a3Fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k0UzYpgw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVkWBUeVFMSjN8AfvKjekrdwCiRLFZ0n3PfJpsJtUPMCaGi0oDREePGdyA1FkFk4hyh/A1cBbjJYJ/8cVwoTHPf0YGkDOHq5ZeAg1SzDA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id by9-20020a056a02058900b005dbdcf45386si2083880pgb.390.2024.01.31.12.25.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:25:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k0UzYpgw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47068-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3EB07287947 for ; Wed, 31 Jan 2024 20:25:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0EBF137C37; Wed, 31 Jan 2024 20:24:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k0UzYpgw" 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 7995C40BF0; 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=gHUaD7p6NgxwK73h9Ea0UinLaAds8izFEMQHVaDaKRY48PnhPbvKgQXZHcCWpGPlb7df9ZgATOswERP3jmQbMQkgDwTwH1qNgEHPEdYBP/Fha4IpUH+9v0mBdz6EE/c7J4exa22bduAzSIp+R6pMhzrbs0Nf/fA2Vw7fQIOJyV8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732649; c=relaxed/simple; bh=l5qTabcr/FSc8zBd9Snc6NefrNZmSs4e6M9FZdZKYQk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IAr4vN8XdVTGGtOJbY6OiHb/90P95/QhToOm4pT4DY/6Y/2mJ/WvlovkhznfguIGdNuD8jrxE8l5rueFe748SmjaGDU4Cm/47mIPyK1VdXqC3yiEfRpYqyNq3wXGs82ExsVwYCsP2AX+Fuqi1Ztq8qDVAmg010pb758XK3F17bE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k0UzYpgw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 166E4C4166B; 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=l5qTabcr/FSc8zBd9Snc6NefrNZmSs4e6M9FZdZKYQk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=k0UzYpgwyLiQrRKo8FEWyGL/vwl8eeYoF1n+sNcdZk8qajyxBqK1VP3bCjz7rjzsW iy9ThfMXpOqyTMeZ6y7Y8Gj7kxHydvDldnyv1OoCp3lnsJsKdLLaPaS1GviHilXQ36 ekyoDesHIxu80HF39GWlNV0VUjSnFSHv7RlNIgPiSPow6E4wOVBB/pwik/6uh6xPiI Q+f+4cU5aFHdOt4THg+PKo6bXqoXe47qkz/Ax6MBPFtP/4GVNn5UO2G0HsIoMSxBwI 9z95+Dewl84Gs2LIeiEH3M2AP9f1wYPvBIaNAhxoAcuh+PiyTsJsyr1S3mAkgKjb2S u0iWutdAnsoUQ== 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 043D4C4828E; Wed, 31 Jan 2024 20:24:09 +0000 (UTC) From: Valentin Obst via B4 Relay Date: Wed, 31 Jan 2024 21:23:30 +0100 Subject: [PATCH v3 08/12] rust: kernel: mark code fragments in docs with backticks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240131-doc-fixes-v3-v3-8-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=3807; i=kernel@valentinobst.de; s=20240131; h=from:subject:message-id; bh=J5dTHNR//Nnyw4X8Q/8C/mtX7OP1rzCZ6Zxen8pohMw=; b=HpgEriZmFxlMj6UQF50GllImTwzlcqVkT988KRK6iiTbNvDURVqFTmz0Sq4w5/UCq5EkM0OCQ kCT334V3M6HC7d3a+bS/t9UEn7IxBQftdV1bPp3QnO60rdWZAnLX9kN 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: From: Valentin Obst Fix places where comments include code fragments that are not enclosed in backticks. Signed-off-by: Valentin Obst Reviewed-by: Trevor Gross Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Alice Ryhl --- rust/kernel/ioctl.rs | 2 +- rust/kernel/sync/lock.rs | 2 +- rust/kernel/task.rs | 2 +- rust/kernel/workqueue.rs | 9 +++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/rust/kernel/ioctl.rs b/rust/kernel/ioctl.rs index 5987ad6d38a7..cfa7d080b531 100644 --- a/rust/kernel/ioctl.rs +++ b/rust/kernel/ioctl.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -//! ioctl() number definitions. +//! `ioctl()` number definitions. //! //! C header: [`include/asm-generic/ioctl.h`](srctree/include/asm-generic/ioctl.h) diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs index 072b8ef2a0fa..10ccc0e39147 100644 --- a/rust/kernel/sync/lock.rs +++ b/rust/kernel/sync/lock.rs @@ -28,7 +28,7 @@ pub unsafe trait Backend { /// The state required by the lock. type State; - /// The state required to be kept between lock and unlock. + /// The state required to be kept between `lock` and `unlock`. type GuardState; /// Initialises the lock. diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs index 6726f1056066..ca6e7e31d71c 100644 --- a/rust/kernel/task.rs +++ b/rust/kernel/task.rs @@ -132,7 +132,7 @@ fn deref(&self) -> &Self::Target { /// Returns the group leader of the given task. pub fn group_leader(&self) -> &Task { // SAFETY: By the type invariant, we know that `self.0` is a valid task. Valid tasks always - // have a valid group_leader. + // have a valid `group_leader`. let ptr = unsafe { *ptr::addr_of!((*self.0.get()).group_leader) }; // SAFETY: The lifetime of the returned task reference is tied to the lifetime of `self`, diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index 8775c34d12a5..d900dc911149 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -168,7 +168,7 @@ impl Queue { /// # Safety /// /// The caller must ensure that the provided raw pointer is not dangling, that it points at a - /// valid workqueue, and that it remains valid until the end of 'a. + /// valid workqueue, and that it remains valid until the end of `'a`. pub unsafe fn from_raw<'a>(ptr: *const bindings::workqueue_struct) -> &'a Queue { // SAFETY: The `Queue` type is `#[repr(transparent)]`, so the pointer cast is valid. The // caller promises that the pointer is not dangling. @@ -414,8 +414,8 @@ pub unsafe fn raw_get(ptr: *const Self) -> *mut bindings::work_struct { /// /// # Safety /// -/// The [`OFFSET`] constant must be the offset of a field in Self of type [`Work`]. The methods on -/// this trait must have exactly the behavior that the definitions given below have. +/// The [`OFFSET`] constant must be the offset of a field in `Self` of type [`Work`]. The +/// methods on this trait must have exactly the behavior that the definitions given below have. /// /// [`Work`]: Work /// [`impl_has_work!`]: crate::impl_has_work @@ -428,7 +428,8 @@ pub unsafe trait HasWork { /// Returns the offset of the [`Work`] field. /// - /// This method exists because the [`OFFSET`] constant cannot be accessed if the type is not Sized. + /// This method exists because the [`OFFSET`] constant cannot be accessed if the type is not + /// `Sized`. /// /// [`Work`]: Work /// [`OFFSET`]: HasWork::OFFSET -- 2.43.0