Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp48580rdb; Tue, 16 Jan 2024 14:39:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IE52YSxfyDFRdG7+mvvMhCTEnTFAFCf6CbdougAVJ/z04lt15gP/+GhFTZNkBMYC21iknPi X-Received: by 2002:a05:6a20:6723:b0:199:e08c:f444 with SMTP id q35-20020a056a20672300b00199e08cf444mr3428979pzh.64.1705444755824; Tue, 16 Jan 2024 14:39:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705444755; cv=pass; d=google.com; s=arc-20160816; b=nU7o5f7Ng1/HXKU5l9l3CfR1tOtVQGIQr4eSqrAX7P7W1bjJUfHAuTz9ZAqQpm438A CnteJBTzEUTMW6VB+hg0DlqqmibimXxf3Zmnh8DJuJF6QxtC0FihDNdKiHcNb8Fiiuf+ BebQBEnJ8IaLQh5ZpBLGHaPXbvBKarqebooc2VMw2zOHbl9mrpbObKfCURN0E4RCiHMr aHPKF0uKsQAzNrKHC+DwfN/pweG+2cIIW1T2yOpIW0y0OUBYYAUMugMV15ebnNq7ka67 W3JqI0erESSLnIpF4jVaTSwvYcLz2tpz0T5qLXsdI8MlrXtCT5jPbSXpBnhWZwOfVFkB 5NkQ== 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=FZ2k6GkRrEG1XmdAxzwQEN8QJfzFgDivpujKraTWFuc=; fh=mB5qiQ7ps5IWvjuQS9+zcxjK3ZInVolb8UwIN1mvAmg=; b=pJc9qv/3rf5MQgFL6PpYr8XOKQ3t6PHSH8PrE8TbQEB4Gs6wZyautJGk3FTIVJ6AzK p4Ixpy8gQuthvOP2zSTXk1NHJ3zoMDtl0ul7ZaknhvFTfzizh/Z4I6s5Q9Tz54JxzEdP sG8JX4nexkqmeB4IzEoCjESspx5y3Mj8YBVTy16Svmy4V+j5hQ0vCQ5J4eBaVYpoxhzW gID39gfDyEjnFk/ImkVGNHcoBdZkiALA6o6CY2TkhELI12GUx2MaLnoKyukv37DOUi7u NRAM+DPx2pAVvw1T0DRhf+QIzqiV15pFQGMNClJPp9bwEuMWmsyG/WztRP5r7GmDIu80 pTDA== 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-28330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28330-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t6-20020a17090a510600b0028cfc5b3f3asi14623781pjh.153.2024.01.16.14.39.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:39:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=valentinobst.de); spf=pass (google.com: domain of linux-kernel+bounces-28330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28330-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B231828C049 for ; Tue, 16 Jan 2024 22:36:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83803482CC; Tue, 16 Jan 2024 22:06:03 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) (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 ED28520B06; Tue, 16 Jan 2024 22:06:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705442763; cv=none; b=k/ilOKYBDnjkICxlvBi2psIWE7JHxjtxOSg9UaIaMQK/2xOsiSZEmbqpYpWlD0w7ydJQQL1qbNDe5PVrQKXcF/Vp5p41TIxi/kA0wDIWlHVEbBZHNE/6OVkyKQ1wGykj22yODixTNwZRzHhqgpehiEaztefbHmV0K/qQo5efLzU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705442763; c=relaxed/simple; bh=MvyFTKEIKMUi/DveRQH714RaRZQ4hMyEjMvMk9I2Kc4=; 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=nGyESQEZgCVCMydIQIu4G0Qy/EUmBbQYr0iu5IH+DdFfrfLv0FGJjIPFReRifPep4ECDxEQfsqLygmw42dk2cmkpzMjVKoRUWMzKKTD6z41vZz748EXmj9U1/2DeNzz1OXCeHpDPi7DPNLNqFu+OYCaY/hdCLsByMu/IHTK43KU= 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.17.13 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 (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MQ5jC-1rlmA60xtI-00M2Ho; Tue, 16 Jan 2024 23:05:46 +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 05/13] rust: str: use `NUL` instead of 0 in doc comments Date: Tue, 16 Jan 2024 23:05:37 +0100 Message-ID: <20240116220537.168057-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:fQ/n+K82znhGVU06WPCL16qfSsnfY7jriAWKz19BeTo/jchs9x2 jj2Cevp5lAEpIIYImIjab/lXFlPzmiQQUHAJZHW1o9INn06euHr+OuxP+pXxtVRpunF3ZVm qHD//ro97BAS9SRU5YNCi7MDgDu9/0ydJehlB4Oahb44L0aHjT9FP330/I/9lu2MXHvtsaB 9K2Y50PZaFM57fB1MjCDw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:v6zN5nHqZvI=;w2vTl94Fb9dj+FV+Lczts64wvK2 3P/qtnHf66kv75rVrJLkpnsDbDy4+rM+dwtc8S3+q9yn0Znzcd2uKsfT6DvTRU9nfDYRizYXR DhEdqYL/BeCiWDmnUpd+uE4Xmz2zkCw7Ky3lyOW+fBXcQDcz+sLNHJyq5c0LNXdvRyvuYkkmM f+18Tu52QFVD26ITkI/fN0pKlv38JmuPPiDvFZQaa3Si4wWYRcTV1IRJ7Sb4uox7bcQHZOb3J sJ0UqIEOqJDuSMZLDiTVnSIPa4GB7qiCx/Ouf/6dGmcK0gaaYqCCIZod48xx6rL0juJZLpAt9 EtxDasdoE8rINUWmjJ8g7wHFCOw8qkEHWQxPeyL+HvGPZpiS/uRMBh4uneyauNb/pGjvntUmk ArIiv6m5ffd6gJaHrbcOmZhKUmlcPnt9MTmmj0IcD2Twk6XTeP8/81bmGnWUDqJk0tKj/8BgY 56gt18Uu02UI662vLN0d3lU5ZT0SEuBlSjmYY78Q75eFVJsTieWPWwGVwGJgTt3aBj0Uar77V m6orRB3WglfXaOVSKovYX/BuslJcU5Qg/LmVVn2IhyKYOocIAIuWi0gyCzKxVc3MYeHWrMJQt 7pmoLWNRddfDOCoNJhfFw5ZW7lZ22yE8NWxrSIUwRR2VA87paKre5wmw8h7Z38/uq9m9U/Hq0 OXDdtnRmY2QPz9jz80yRUEzIxqKj/R1Ogo80K3zd8Db35psnxGjKZ/Do9O+qrxjfcrpnXTSx4 jR2TZshVhcmNDO12InKP6bv6ac0devVSIFsMQGLbU7SaPkybsn2R/U1PsCZ7Q/5YsmRoe5+/E qwYk7w5Y48I2btBYKCrulCPYTU8FTH1gvEjCVaQ43/0/pUDcHKQtDMYTfZjR3sgLKh+ytsIt5 60FBjwlj+lgjjjQ== Throughout the module, bytes with the value zero are referred to as `NUL` bytes. Adapt the only two outliers. Signed-off-by: Valentin Obst --- 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 -- 2.43.0