Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp575436rdb; Tue, 23 Jan 2024 08:11:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCUGT49PLvLmD72yuVxkRdzTmRD6SWJ/OW9jfxKUb//8u0zFeP3SE1LE3Z6DHrsfSHhsGJ X-Received: by 2002:a0c:f189:0:b0:681:77a6:59ed with SMTP id m9-20020a0cf189000000b0068177a659edmr1073013qvl.37.1706026294494; Tue, 23 Jan 2024 08:11:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706026294; cv=pass; d=google.com; s=arc-20160816; b=KLlLBAXX9ErmsCtb80yCXqurQS3jVWngubNuwFARKvtNzq0fL9QONRlJlK7V7lBYjJ xIwZSAuEJoa2b5dUtk1JFSujP2mrvTYT9thq6tx582dv5gUTrnIMxPSNFXwrN1timPTj Xu9SlVzQdzEurA7cCKARg9HuqwS8YG1mBideIb5ZynhW6aXTi21CL9iVgBkDgyUBhSyv xi1Y2V2fiZ+TcuOUb6m99GakwunD6eX/TGWddMg1YcUz+EHLvvItzpKidUSxYKqbol2l FTVU+e6wucwu9161EpNhVuLzu6Ccx/dnzCUVV7PnaRq2E0l5SfcCRRTSGUNC7VTa8nG9 9/yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from; bh=bWsCwgiF2eOGlSjFEiZTWOffVNJUu5vYrZMH6T3GBMU=; fh=BZI9iWTaEf0O3fXVlcMygnOLgsZaFpsfuA9TcLqdYG4=; b=Rq9J1/vncpVIHz8mjrVU4lAkmXVnTLCaixxanog2NECLIjoPach/djz44tZt8ptIlh G5P4lAoZud6KXl2od8ydPTmHCuzCQyNt0m+4zphW67/QEMgrOjopzxgEhEzNXLQ7kAiM wtYqFLFEOzBJ4fsPkgPBUZsyYKiAiSdpTzn6OP8b6I/sIItYc+xzklY6NKfuR3ay6mmP yQn4VfX2wmK6H+R82RaqcgJjsJ2GCm/NyeLqJN3qUiR+fQqMaWWp4lofVwrk8W1V6jka 8BWRpaa/RgC1VI2A9CNpQ9fVveDlykmDII4dhQOg/ixKWcho0aRmlCvkNGRCensUw2W7 REzw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-35628-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35628-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c13-20020a0cca0d000000b006816d954535si8488353qvk.424.2024.01.23.08.11.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 08:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35628-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-35628-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35628-linux.lists.archive=gmail.com@vger.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 34ABB1C28367 for ; Tue, 23 Jan 2024 16:10:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CF6A63513; Tue, 23 Jan 2024 16:10:03 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (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 F17ED6166F; Tue, 23 Jan 2024 16:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.72.192.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706026203; cv=none; b=tpSmxYpClrrXaJVA23jckNb1p1gY8Lv8AnTdqXhtGO1IAlDl+SLz0aRqfIHBzIt1PBzJEEK0r6LkYjGRxzpiccHUFXagafMQAkKF836VUgEi83G5pgBYZPse76FHybkK22pRR1LQjz2tsbgBnb6lLWCWDP68QRgcy7GuczNYjlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706026203; c=relaxed/simple; bh=7evZ5vnJssnQ3L5gw0A+dVQbOD4aGjWM4CuIu8PX8rM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XwqjR0d3t+1UTHvCxMDZtfYI+qALrMzVbfWjaUWAGL4BsSsh/apf7XAy8A4mikJaGyYFGwWI2HnujxGi1KWiFdou+snrRnN95+BA5cJl5y6QAMoUgfrqtklW7rIeUtaT12leJVpskCv7305MI7AYSJBhtol2GqLazg9W1kT1KSI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=valentinobst.de; spf=pass smtp.mailfrom=valentinobst.de; arc=none smtp.client-ip=217.72.192.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=valentinobst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valentinobst.de Received: from localhost.localdomain ([95.223.130.98]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MhlCg-1qxONS0TGy-00dpaC; Tue, 23 Jan 2024 17:09:42 +0100 From: Valentin Obst To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/12] rust: kernel: mark code fragments in docs with backticks Date: Tue, 23 Jan 2024 17:09:41 +0100 Message-ID: <20240123160941.125348-1-kernel@valentinobst.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240123150112.124084-1-kernel@valentinobst.de> References: <20240123150112.124084-1-kernel@valentinobst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:BVPE1uGnnEwYCq5nQavqew5CMEPSzqQb4jldVEYOWski2Y3V2Py xdjj3KWBOncdzQPS38py2WQFo9L+4S8jUa5f2lOVvoi1ajzgCMg/h6eWUcp3xrazQ6YcoMW x5sZwzUGWXp8UXJNk+2vfXXTN63l/gHYVCo+rGdI7X0MObeJyWfF+VAhD7YBMma/8fyohhb +mP2awwuD4gzeGH7o+7YA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:0Nbwhu/xRzk=;n1YrVuSglSXQZyULkMu0U74euon OoU1lAftulE7OJI79yH2pLK9UjdHfMFJES3S+GgFo1hUvpSwQ+K3KPheSkT+Bw+kzVxeAI/7t rqbgJ2fJiUEFalwdTv4HDUa8DxNuC6P+eA5r679Z+SgodB0Topd3JYbhY1spk/fk9RvuVmkz4 RePyF1D5ZIIykp3p2QL/9h4SSbRje/S37CF7kGa9Q2cqWmZXPSXY2Tyl+/HWdzw/+jp3O9ZN3 YBb+agAbMfAUWadY2BhntAT7u7fvc1devSG0zlRMcGfkj3DTrWZ62lDvmO/gxMUvxXqcWK74x 6mFxuBBxBY3lGx7gq52B9KLSBbwmIopo2+TGu4NHGRYAUSjRG6Dozrx8e54/CQhYQBoekuW/k SleZAeyxLS2mQ1oaohRNozbm2JCdPP4fyHdCNufR5kQtIWt+n/h/Qw61HcFvstw7ElukyYI7+ 1upMzgyGPc/FzBBbiwvCz3Uo466RuDBJ99/wOBfbRSg5Ndjfn5Q/2Z3oq5+VZUUzAE2si+mj3 TXi6vII+z+SsZnkcX2qfbmO/Zl7wyJDyKQ3p+JzSKyuo3xZ68xRRLP33WpS60McG+sdpUdeXU +3zj806FtVb/yqRo4ujzyaY3eYo9BsYibSCCJMPbWhVdVZAsVa+KYKrVAZljyx9UvNRemqpYo hkal1TUG+sCm67QYEw1xrKSzWCBK+O5EInOvJOMgRq3oTtjZCwMC2s59qEkZ5ecXgluNJ8yVz qokrUPmISi76RT7N6aZ2sjGlEnEUj6nmSgWlhm+7qUc7ob3s/0EPonVTN4NvJtsvazsTIHVQT B+0p3ctFguXGuPN4s+rTZFSZl79j2ePm/66v46R8bMNH/ts1JjaEiPLkwD+eZ+QGb7Jx8V8VV sHuKJRYPc1xuKeA== 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 --- 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 87e111c0da17..67588654c22f 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 818ac51b06b6..d4b0d232480d 100644 --- a/rust/kernel/task.rs +++ b/rust/kernel/task.rs @@ -116,7 +116,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