Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp65115rdb; Tue, 16 Jan 2024 15:16:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkES2doA93HzaNsihRH7dNh0kL3wHrGUNovIGgOxE7IlpyzWiRA/6xVex9porp9Z7ynDgp X-Received: by 2002:a05:6e02:1101:b0:360:83c:31ec with SMTP id u1-20020a056e02110100b00360083c31ecmr7865338ilk.61.1705446986069; Tue, 16 Jan 2024 15:16:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705446986; cv=pass; d=google.com; s=arc-20160816; b=HxHJeq+ABZo2AeJtuNOe004mOdXGO5TK55KKvT3ZHMoBWWt62rA/LL9W62sGT8G3o/ gYs1ALFm5EQYTc732AVjh5Xj99B06Eh54fCN2XJTeqWCE8vOdKsIYPmacZVRTbqqwLwW IGsiQfo9U26FxfjRiFCqbPj0S/SM3UPCtLbC13eR2vvd3TXZCJCTafOBziKQC/liCgvK Z4eJ/walJS0LkXlaBmeOTzED4hUY+BSXCfqfZMTZxr7hwPh468e/powhVRa75GWiTp6e LBQCCKC+mqN6ZvWii7DNl5OVnCe/2VyfpoT0/1PQ3Us5n2xTsWRDoWCtHtvHODis5Av1 W5MQ== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28367-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m12-20020a6562cc000000b005cee039f233si11915979pgv.425.2024.01.16.15.16.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 15:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28367-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-28367-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28367-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5FF2CB22516 for ; Tue, 16 Jan 2024 23:11:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB0A01D526; Tue, 16 Jan 2024 23:11:00 +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=20Roy=20Baron?= , 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 Content-Transfer-Encoding: 8bit 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== 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 --- 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 { -- 2.43.0