Message ID | 20240131-doc-fixes-v3-v3-5-0c8af94ed7de@valentinobst.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47071-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp4296dyc; Wed, 31 Jan 2024 12:28:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtXz8raVhdxGZW1z4rOI8lWOQITzArWy2yZKhjhp1eLz0HRkJdEU6bUGeUKv2F4CffQnZx X-Received: by 2002:a05:6808:308c:b0:3be:49c9:472c with SMTP id bl12-20020a056808308c00b003be49c9472cmr272300oib.1.1706732908698; Wed, 31 Jan 2024 12:28:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706732908; cv=pass; d=google.com; s=arc-20160816; b=k3hlEif0PuxxbaFnQUqxihDbkVrfNdub3KE2aiI/5BLr4bCJeMf2XPVL+fK406hC54 beLldWONsqixAGKsdb7Cj7nMC/0/3jxP46DmYqe9O7v5IIuGgrOc87BhmUz0nC2rbVmE a9PKx6AX9/6H1TBqc86ap2OS7RnJumyKWL5ini7F3Wbk16zmG7Hnw6hC9B/uUt9lR7eF D68ic2hoYlONWKppvXfQ1chKwpqxqijbOioxdSNh6Eg79UZFiNF/+XzM64otu+utKanT 5xAVAQMdUasWPNNlRXRfkfBDcrxcPqF8W7EiPWp/2OmYnWZtcCV8D0y5fJOu2ZBxqHe/ T3oA== 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=xDejmAggceO3L1hDY+w7Rw2aJcwAnGehaQQ0PvfYMbU=; fh=r5YNXeBK899J6qlObeKp6lkuKSNvX2q2QDZ9t5Gc5x8=; b=n57s3zxQNAKBoBquMAt69qBdKYRXV/nVsy5mvIQe5zinYNzU8wq22xXGWpqvbJ39Fd oAW+rGrY8bdeufkYI7qlqVXXvP2Kl04IPcPtWTPb8ixdHIj50QCnY2KvsMG58+aLLHkY l5Zs6+3nKf2aCGBg8meZGiJNeOOcg/xqbTHae3pFw9mjedVNDPoHvbvghWDHvThXXBHa SzJv5l77km8A2sJM1s/YfMQzdmz3PNTenTqXkU3WW77NVzItmEGXR8/MeilSB+nGVhkl nOHfP61GUitwoQDa4OB0+OI33k9YkhvrbFBJjuAC/c0d+z2jJAJxigrwgsxpPeGkl2eU VG8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M3sn+vi6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47071-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47071-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXaYWJObKC2R+bixPcvosNejhlDRK3aMBVw9hKqRZjy2BrJvvViakUamzHZ91UL9GzNhNfnEG73xnK4kNKfex2PoCfhfg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y10-20020a05622a164a00b0042a084929d8si6127333qtj.787.2024.01.31.12.28.28 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:28:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47071-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=M3sn+vi6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47071-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47071-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 793F61C21922 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 20:28:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5E1B13B7B0; 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="M3sn+vi6" 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 874433FB2C; 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=LSlXARwDDCIBkhm/fQUzCWin4SumC3T6zNEhTryyzeNXR/XmmaWgz6F8aoaMOeTrrCKWGf0D0LfvNBtKPKa+oeD7a+3y2XhIEqTdWS/PS1zx9kA6bxIaXgr2WuufWfkLyhJ78PeF+rkP9r+ydlq/nN9JUtV/LrOnRnZ/zUX7pKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732649; c=relaxed/simple; bh=FA1F9SC1pBO6t7e2nw2RaFdLgUedeL9JkTxRX+R5a1k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IA8gcTj8m/20YHsW6z42z3di2PTlvjSDAFp63WRWZfGypkG0iATPdspnuJFriGE66o6gA02XT6UZ5qyoniEMAbscHkrfvzcALsAkmdeUA5+bDQt2tS5NHitj9tNWRiLR/kVrk7f3lRUZa3qGQuOfKjB+YpsLxoqGdZbVS9KeUN0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M3sn+vi6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id EB7B1C433B2; Wed, 31 Jan 2024 20:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706732649; bh=FA1F9SC1pBO6t7e2nw2RaFdLgUedeL9JkTxRX+R5a1k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=M3sn+vi6Cu1BqqPG4lWEehKMEuMstzwT45trKG0phzxD+5JsFIKqi8OkMmlDTL2+F AlzQJUSUyetwBHWF4VtgFllYGxJCp6EPCJZ2XyjUTcZxiC2etr842ulVk4l3Ei/vmp nkg6L+eVT+xNK8uVB7F4vwzVRTPwPOga8Xrn6l1KsJb4P9a67xhCwt1lLjbdWz3/8t ZgKR6tTGj7kWigoktA5X3lOqh8bdbJJVgB6FmCPtRiZjmgePKU8J3cBnf3fZR+DFlJ UC0WycYvc5y4eY5W6VAvnmvGfDVJFUKfB2wgPaYuD/AmQpG/of6maTf6Q7SIW6ONSA v00MsMB5HIvdw== 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 D7B9DC48290; Wed, 31 Jan 2024 20:24:08 +0000 (UTC) From: Valentin Obst via B4 Relay <devnull+kernel.valentinobst.de@kernel.org> Date: Wed, 31 Jan 2024 21:23:27 +0100 Subject: [PATCH v3 05/12] rust: str: use `NUL` instead of 0 in doc comments 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-5-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=1199; i=kernel@valentinobst.de; s=20240131; h=from:subject:message-id; bh=t90awkZOfJrNEj9Nqg9r3N76iP/cmOjmkwvkrtyw/9I=; b=hqfaaXwqKw/qal+VSCs0YjOz+bA68/qcnK/d1pbkLbyCibjtbc31Gxbrt1UfSfIgjGoTLjxY6 rJEeLkBTy2EDgEhqxS22yuDkLgnRAuGmCvQBc6KePEKQf5KT1v9gKbu 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: 1789639166820852886 X-GMAIL-MSGID: 1789639166820852886 |
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 module, bytes with the value zero are referred to as `NUL` bytes. Adapt the only two outliers. 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/str.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 0a8569594fc3..843ffeec9b3e 100644 --- a/rust/kernel/str.rs +++ b/rust/kernel/str.rs @@ -149,13 +149,13 @@ pub const fn as_char_ptr(&self) -> *const core::ffi::c_char { self.0.as_ptr() as _ } - /// Convert the string to a byte slice without the trailing 0 byte. + /// Convert the string to a byte slice without the trailing `NUL` byte. #[inline] pub fn as_bytes(&self) -> &[u8] { &self.0[..self.len()] } - /// Convert the string to a byte slice containing the trailing 0 byte. + /// Convert the string to a byte slice containing the trailing `NUL` byte. #[inline] pub const fn as_bytes_with_nul(&self) -> &[u8] { &self.0