Message ID | 20240131-doc-fixes-v3-v3-9-0c8af94ed7de@valentinobst.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47073-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp4408dyc; Wed, 31 Jan 2024 12:28:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHS3+OJWLUbYfFq1VE1XGy8QLubEkTdqvURJ2famY8dr4seQrYsPeb4a91QzBzu/VVYDd98 X-Received: by 2002:a05:620a:4ac1:b0:785:3fcc:341e with SMTP id sq1-20020a05620a4ac100b007853fcc341emr572227qkn.10.1706732920691; Wed, 31 Jan 2024 12:28:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706732920; cv=pass; d=google.com; s=arc-20160816; b=Pefc8vAqYDaNQf3FMbmt9rhNiy0et/0iZqlYTp0B0wJpYG0bEiQk4/zuwiYOb68mJ7 FLUZqZ3kfx+l7zfvBKTfEjHckh9nZUXZ7ytX+tPUV80iAFk5oPbzVq+3XKX70mImXfzg vN/0H0kyvS99utbnxFBP4SkRq83d122mWrziR7YKuLGxbvLMcbRgDDt1TAMletiyoYQI meNqmjm0Gub6PBpO5xaYrUMXS0hfKUFsnP8vc0KS07hGc2CIGGjKcyF+mc88vYxpQL6l /TpSHbDzcNMgUpALsSpkXlpUJg+U86JmbRce0sEkB7xSNDmqpIzmqVNGpeh2fJKTwtve oPrQ== 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=prXxJyC/ZQcQzifiUmAM+NE/1512iPupsl9iZCvbPFA=; fh=lH9CNV1Gx8+UT3nMVghpvKb2Utuax1jPQ8/Qghp/xaU=; b=x/70I6JJi3FVtD4tmMPrl05u1Xb/EhzeHbobRTL6mQiXBEQfZITYYLiszaMUvE0S8K BTn6p8ELGb3Qp0eQYrfaQ7Exu4QhddMuT4EnzVK6Wvj2dmquTftesT8OPVFiVxWaY4Ah KLub8ie+CaST4TpS9gyTho5+prmQ6xI8GbNuIBlUtdYmFa8ijrSR/sr8nw8buLQEpfus fXCVd2cwvj1kuD++JL1Av2FFsg6B4OC8RbyjGxyqm+XCR9OOIcFY71dEl0aR8iPnbyr/ s1EVLiPMMwLlfJt72Fz+ui28WpBb//h24qtX9nBmHMdIe9YZuTR1wWJ3lIj57ShivjuZ 3qVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rGExPr9+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWgQdr/Rsgu9Xf6AD8FdIqkJ4DjsI1B0M2TQ/x0td7w3DT0KpXQRe4hM1SFefJdmlLen3pu4mWbyqLKEAQl1PjYMTFQwA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b25-20020a05620a119900b00783f41175a9si9340987qkk.426.2024.01.31.12.28.40 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:28:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47073-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=rGExPr9+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47073-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 7BF8C1C22D59 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 20:28:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1A7613E22C; Wed, 31 Jan 2024 20:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rGExPr9+" 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 8C3F35D90E; 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=Mca4QRsTfZfce+HNQjaj98RZ2c7P3ES/4pV+z65bR4KUM3SQHbkzRQGvs3Aq/PRh9K0Rcd/th+3SkfRu4d4soGYsFKr0oK3bvUhHIadYsv6v6Hrrn2rUz/QIbR4B4gTy+aH7Kg2Ae1TR7wiEdXMmWy3RkAIVuRCFOZ+Ve8gHTWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732649; c=relaxed/simple; bh=oEOEYI5XD7Gl9YRicVq5JZCnoGI82gQIloe6mONRHjU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XgIZDLYFqIS9OhVCQ3jyJ4ioNa+JAjBWUVXhDV1P7tO3rwmD8rnLsyp9jP7872FgfD77y672BHFC2QfxOTjGtGQlJTqxw3FyqhtC2GxkFbGwaZ8I+hZyzXMY7ZkzLh6jwSGJKcjBkxSrvM/7NZgDvYXb3DZn7XosqxdzcqXsoR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rGExPr9+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 1F205C4166C; 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=oEOEYI5XD7Gl9YRicVq5JZCnoGI82gQIloe6mONRHjU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=rGExPr9+3ePh7IQJE1IiBqRGNyopfOoMG0OTUQ0ZNelBntg7+PMd6SILPolM6XYg+ q8InwkqMCMp8fzu5jzSomz190Id6CC7IV+hN4VOlbuWyz+5jjHJdCQz4RApuOQK2GT XXBl6x957ki7uhKVEbxo60AchBYFGaDxbeMWHKsGQ+VCoZ7rMPQVzqJT8pw6kfSt/R BJacbHKDBijbyldbvGPVkwIwBcdAEgHMrquzhA6V3Vrs4keXq47aNc/yPGXxDokjRU TGOEnqmRIjsd0KG/UwIWwZsqO/JIJR2EcfCqmrJqSHZ+mcPc+j48+n9U1idTkfmxqS gcLFGzEuwog1w== 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 0EB54C48291; Wed, 31 Jan 2024 20:24:09 +0000 (UTC) From: Valentin Obst via B4 Relay <devnull+kernel.valentinobst.de@kernel.org> Date: Wed, 31 Jan 2024 21:23:31 +0100 Subject: [PATCH v3 09/12] rust: kernel: add blank lines in front of code blocks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240131-doc-fixes-v3-v3-9-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 <ojeda@kernel.org>, Alex Gaynor <alex.gaynor@gmail.com>, Wedson Almeida Filho <wedsonaf@gmail.com>, Boqun Feng <boqun.feng@gmail.com>, Gary Guo <gary@garyguo.net>, =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>, Benno Lossin <benno.lossin@proton.me>, Andreas Hindborg <a.hindborg@samsung.com>, Alice Ryhl <aliceryhl@google.com> Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Valentin Obst <kernel@valentinobst.de>, Trevor Gross <tmgross@umich.edu>, Martin Rodriguez Reboredo <yakoyoku@gmail.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706732646; l=1527; i=kernel@valentinobst.de; s=20240131; h=from:subject:message-id; bh=uY1sZnb/LMfFXaWeBAwEM8DMFKBsaytN4jZN05O/ykE=; b=99dau8uj89rQF+Ui2JVfPI4xnHVD6+T01C8FkwBqgFe94TWEWf3h/+vqiyLPqj9bgVxIXeeWy Sz7HbN+z06sBam3gLTECfS+tY1SSHGwiOu6AV7FDJFKsZ4pC8ygnQKz 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 <kernel@valentinobst.de> Reply-To: <kernel@valentinobst.de> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789639178899087285 X-GMAIL-MSGID: 1789639178899087285 |
Series |
rust: kernel: documentation improvements
|
|
Commit Message
Valentin Obst via B4 Relay
Jan. 31, 2024, 8:23 p.m. UTC
From: Valentin Obst <kernel@valentinobst.de> Throughout the code base, blank lines are used before starting a code block. Adapt outliers to improve consistency within the kernel crate. Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> --- rust/kernel/types.rs | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/rust/kernel/types.rs b/rust/kernel/types.rs index fdb778e65d79..8aabe348b194 100644 --- a/rust/kernel/types.rs +++ b/rust/kernel/types.rs @@ -90,6 +90,7 @@ unsafe fn from_foreign(_: *const core::ffi::c_void) -> Self {} /// /// In the example below, we have multiple exit paths and we want to log regardless of which one is /// taken: +/// /// ``` /// # use kernel::types::ScopeGuard; /// fn example1(arg: bool) { @@ -108,6 +109,7 @@ unsafe fn from_foreign(_: *const core::ffi::c_void) -> Self {} /// /// In the example below, we want to log the same message on all early exits but a different one on /// the main exit path: +/// /// ``` /// # use kernel::types::ScopeGuard; /// fn example2(arg: bool) { @@ -129,6 +131,7 @@ unsafe fn from_foreign(_: *const core::ffi::c_void) -> Self {} /// /// In the example below, we need a mutable object (the vector) to be accessible within the log /// function, so we wrap it in the [`ScopeGuard`]: +/// /// ``` /// # use kernel::types::ScopeGuard; /// fn example3(arg: bool) -> Result {