From patchwork Tue Jan 16 23:10:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Obst X-Patchwork-Id: 188645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp577025dye; Tue, 16 Jan 2024 15:11:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGI/PnkyiO68q8PCy0cAL7bFFI+Tl0oEyrprORBUTpbRH177Q/3JUTYyPL92lAXtkwK8sj3 X-Received: by 2002:a17:906:5204:b0:a27:a258:f340 with SMTP id g4-20020a170906520400b00a27a258f340mr3594298ejm.65.1705446685885; Tue, 16 Jan 2024 15:11:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705446685; cv=pass; d=google.com; s=arc-20160816; b=j+xMqopgTxzG73RChISD5TrdbHxzhEwRxqVrbVG7QtwtiBqFvFzrz3H+nr3ojPJc2q cTRhM8X0QZMZGYDYd8lWkWITyginxAbJyfuGSaNFB2vtP0gImq0ahCQR1aNRyXM9pJvI Wt9mQOFO8aAj5e32Rtg6jGaRWl4zZpsSdyrpNP88YukCEmPZKRG5UamBgdRp4ralQxvz Sq3XFlsHV/8XKp2f4EFHtKmL72oFOqWGusnC9j7/cgfJVOpkWUrC+Xem6hqmZBkvHO8T pNHM13XqKItHxv9o/qXFUlFqpt1PBys33JhOyRxIPPHS593N1CjZTQRqhHtNnbKFyNYz Nicg== 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=K0JIdirf5hV8AGpcvpJwIO1C5Npe6h2gQCWIHZGNVGA=; fh=mB5qiQ7ps5IWvjuQS9+zcxjK3ZInVolb8UwIN1mvAmg=; b=egKcGn5EYE5P5bf5hJOXjcyCRp8vPixHpFzNMy2ThDibQBIfFqwiUPIKx/PfJDAs8M zP1uiYUUYkzwX0tAD25vqxYFiyM6uelV4ndcQc0XvosU7L5B0ZEGnOlrqHFSY/cdJWZT etiObidgIZX270av2+1FV9A2/fCLEAhdOkQ7+gZ/FFOr+a5q1t97LFc+mcPiQEiniBKl w3DGD392XRaK5YbGl0K7gwsQnDgyBEEeuxp3lBBPl5QFfDmjABFJ9gdtNasevpSlsFUj BLOp0e1exvShPhCe8tajS6/6NhLOFJmUYgDSs1BGClHtso99OocETNo6ZrfkarzK9LLs puNg== 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-28367-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28367-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x7-20020a1709064bc700b00a2d183431acsi3618985ejv.991.2024.01.16.15.11.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 15:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28367-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-28367-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28367-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B55D21F25BE0 for ; Tue, 16 Jan 2024 23:11:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED5EA1D6B1; Tue, 16 Jan 2024 23:11:01 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (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 90671154A6; Tue, 16 Jan 2024 23:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.126.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705446660; cv=none; b=rkkkdxT9h7M2JNGsZRPAt9FHmHBG/kMbhO5NM+tlTCfoxGV+PUCSE+nN/xiIIBY0h1BoprVKUlkLGMBHfAN0YeorufIFpeUCr/PZNx4Fl4k64VcCkywQlc/MDc7ntEJ4x46iV/UeIbDxn9wq4l5H5VaClxkzme7HwKyRhPhNT3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705446660; c=relaxed/simple; bh=6kMEVkUtpENf3uILfGmx7CwIEW3QhLIKQG8D4rvGCJA=; h=Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:X-Provags-ID: X-Spam-Flag:UI-OutboundReport; b=YgE3FkzvVPDFHruHXl+UFWB+fOmyWSgqTvP28zJu/QgxUDxjup+8m9upOGDCeOrykZn40ypDaZDyWUUXxXcmWSM2RoGkY9ykPBKwg4WuDM4Q/JTFvQIpkCO4AvvYA0s9SZqr21fXrr7oKzd1zAIyLf5t6qrPitGWyRDfQCFh3kE= 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=212.227.126.130 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 ([217.245.156.100]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MfpGL-1qx9X32FpJ-00gF75; Wed, 17 Jan 2024 00:10:44 +0100 From: Valentin Obst To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho Cc: Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Valentin Obst Subject: [PATCH 09/13] rust: kernel: add blank lines in front of code blocks Date: Wed, 17 Jan 2024 00:10:35 +0100 Message-ID: <20240116231035.168838-1-kernel@valentinobst.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116160141.165951-1-kernel@valentinobst.de> References: <20240116160141.165951-1-kernel@valentinobst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:GExkHjC2m4S4YEdTb4SLROcE6xv0Z0T/xFkMhp5M6sKfwUta1y0 1giNkzmUSLAcASxRgRoxVyGEv1FggmrU2BmMeXd5Vfq2Ly6YBRRXTqHtkmXEpcFtYQMze98 02rRZFRDA31TwayVtpH676fkJHqGVtE2P9wnQKZKNJ/qLTwII9DWqs/tN/5Mt6VPyNnxOqO i4ltBknD5pM9WpO5bcRDg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3227nHjRX/A=;k5khFr9FsqthzRRubZhi++CxcZI jH4DDASQY7CRx9oNVgdSN2l8eXsrZegC/jMq6BwCDHzVGII0P4VEOtsg62d3H/sR6b5Z/lUp6 hQDZm2A/MZDSwpc7sdt42v69jbJFGa9W+A9RiB6vIUs7T0QO6MRqaW1lf5gPAAxK3PC5zKCFN 2A3h39pmnNp4cc1UFIZjWAwCrH5yuV5oJw8dGgSYDQK9F1cclVw2DbxbBPm40QGEVL8sZpXqv VkARNvwCto75dplhtA3QEVVYCIDk6YGPy+05xvQ/jVtYzZivtF7GpWe/82U/i7TUuqnRDJNTA 7oolEiBEw4vObu163oN04U7QUWOBenFlO3eabzMbkvyE0mEjN8KvLA8/d4mSXUIdd0gF7c8ok pfXLw1cmrx4OyHrCcJvW+edZWnVVA004PzrYZmrJsZmZQmxHAAvI8UA87hDDV8WY4ySr0PGGC LxYPrFdwwcjwqpxObP/ly6dW+pok8sLe2tO/1opRI56FuNxgePMJXTW6x/hPgVOjsWxVadi99 BcDHcW7qVF5fzdfe2F5+ZMHaZUmQ+yOEHNHB9EQi1Q6+VE5TbNodByMZ5wmgcVUYd9jCdYdxn NPqWxax8pulkCShmX53JWXoT5TkLiBSWaRZ6n5Ec4QC+eAM+F70J4AqAbV6XMxQ9CU8+mDktX pWZy1OYXe+f5rPjM5Ky6ZD5b1eHSKIjpAQQr0LRFQNDaM6K7H0y31CbMl66Z1HjgEgDL18RFq QAq5O+tGh1xEBG2vCyt0RWnVrZTZfZ9RGBa1D4qEIdnJezbTcEsveFI4PyoPecD95jF2ubKmV U60dcEOoKY3Hsb8AMj7yHVslk0NP2uyjBTtYULObfzg0/R2fhvA3pg7V+4/g91p2oDLcTaVjd 4rqbsgGOkgJm0Og== X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788290464233627204 X-GMAIL-MSGID: 1788290464233627204 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 Reviewed-by: Trevor Gross --- 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 {