From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F16277E110 for ; Tue, 16 Dec 2025 19:15:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765912538; cv=none; b=cHZfI5EDS6bOtZr7Xb4mpfCB+s7S9wDY8yhUhhG2SRVcK4x0y3bdkXzUF4882N+k3vCkL/Ieva6s5U4o7gQLvCJ0Wlxi3jD5fMn4uJ1MubxU3Jk8RvJwdntwLi2vjxHBrExtYrHx3FVLKFdSjE/5TF6h98p24L+94W0Gm9k2SNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765912538; c=relaxed/simple; bh=3tHXMsm1OCt5YZdYzFG9w4kHHx4igpk85I6TNsm48BA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oqZ6/FylrFMo7uHSTpUS9FnyiHIGyHubugkS/Nf8gvf+/DA2aqi0/yOkZS4YWVA92s0O1ez4yfAcfVnXVafbVjQWELFev99KjGtJ1HoGcAM2fuME9cORq4EKB/P6Zz3V9seuPLbnNdDSCKCtU3hoDYR+F7St3iMqoszARYmtf3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nc81yAiI; arc=none smtp.client-ip=209.85.167.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nc81yAiI" Received: by mail-oi1-f195.google.com with SMTP id 5614622812f47-4557f0e5ed2so2911406b6e.1 for ; Tue, 16 Dec 2025 11:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765912536; x=1766517336; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/zjAAqSV56UUsntmodF/ee5Fb5KCcdP290251Ad1szo=; b=nc81yAiIVcvjnA2kr/1dCI56QBIEpdPB/VDfA1+4EDAHMlPsxXPdqqv4r2TcrcJMRq Cc+f/XazlUCt/+L8cx9uEm1i6DR+qXEURRBNTSHM1Nf1RBA17lPF+7EAS447iW1idB4C 5wWO2UGp/Y4TcH8XIEVD9oGHam0/QcRwEaJNd9EipAc85vvx14Pi9kaFy7kksy7fG58c 3si6fEZoe5J5BdoDVmU4bJM/Q0D3HJOdbAxfJrR/GF0QbHKI7L//SE1c+Xv3b7XJjC73 k2C6dsQjoRz3zq78z3FUwDHbgqqwzbf1IGwcJCfRVL9bnJgI8V62gQrG+2z3HePPEMbd Rnnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765912536; x=1766517336; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/zjAAqSV56UUsntmodF/ee5Fb5KCcdP290251Ad1szo=; b=Qk6jtpei2q7jT6aevff1a/3qd24PXgJFHLGG86Loj75Nh0o7xul8kxzb5W9z/doqmc v+qkP+rJZEtdZV3eQkQsF/MOxHnbNFGIsgtJ2CwxSDbuZte8QLWYyNC8KWQ05JfkjBzx /6QH9tUu1VguFivMlvA88P4wqRmIbGnSrSE2f7P3+gYkWVA9mRFUqWB0AGnBBQWo4lBr jVlsXqbSTsSQopfW88sWoxNcycPeYHOQPNJw2Ya83TX9F24nJ+8EqQ2EINpVZbkHzC8g atEpZnHDPPunTmTdamBv5luTneAO+eT6cj7TDxmRzspRoaJ+lmTVe+lyKaYLmKrto+bO i/4Q== X-Forwarded-Encrypted: i=1; AJvYcCXi0FC77T980m+94NzsR2hqAhpTb50PI8SqbESqIoedNh0sKql2SI+o/HDWC7YhMrSSL4g1KFQ71WAStpA=@vger.kernel.org X-Gm-Message-State: AOJu0YybJoc4yw4/TCeKXxQKMwG5rEyoOopWFrrdpEPvnIv5HZe7Cof0 /5mEzCXYJsbN/i7olS9g8c0FJka8z1WcxxbRbUbpoSwuTUM7YNN0egHW/DOQ1NSc X-Gm-Gg: AY/fxX4YTH+Tkm/UJUuaUM0hWqbTwn5CSL+b9WNZX1Zpbbi+aHHk4agj80Gk2xWyfM1 zJBdlQKBWrpD6enLa8be1ngk/apv4X2uFFwRWKlhgP9XoNPjyONrwR90ydHj3pwov+7t8btV2Ls KubBp7W0AzRaDSWMyOGfRL9pQWIlOjBrbtyeZyl6pb8XnE6GKw7LuQb/zd0pPxh3l3XQRk7SgAB Dvg2OdJKUBJeyTIaYLNpfmNH/fLqQjgyO9MYt1Woxn/plqkFafPUUaJSpwvzZ7ywFpEaQI7G+EJ TomL4GhPBknDCXVD6h+VOp9UpTwBpMYlcFYUTnwgFfXGpZdAtEOoi/6kK6nLzCVsJn0IIE45AYM dpYzELAM7Csxn3LhIePtVbCiZtWrKqDYUFEytncbLsb+Il6z2bhNIHPuLWu+8uIuzBJyvYX2l76 gGQkETwrY= X-Google-Smtp-Source: AGHT+IFMYpXXi8irMmk97Ph/W+8k6q63mI9S570vxddyywsfYt0minQQuMWna1s6EIOfhyTQaj75dA== X-Received: by 2002:a05:690e:1502:b0:640:db57:8d93 with SMTP id 956f58d0204a3-6447a4e960dmr14167600d50.15.1765907240911; Tue, 16 Dec 2025 09:47:20 -0800 (PST) Received: from localhost ([2601:346:0:79bd:7f3c:658f:3c84:2aa3]) by smtp.gmail.com with ESMTPSA id 00721157ae682-78e748cfbf0sm41349807b3.7.2025.12.16.09.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 09:47:20 -0800 (PST) Date: Tue, 16 Dec 2025 12:47:19 -0500 From: Yury Norov To: Nakamura Shuta Cc: Alexandre Courbot , Miguel Ojeda , rust-for-linux@vger.kernel.org, Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , linux-kernel@vger.kernel.org Subject: Re: [PATCH] rust: num: fix typos in Bounded documentation Message-ID: References: <20251204024336.246587-1-nakamura.shuta@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251204024336.246587-1-nakamura.shuta@gmail.com> On Thu, Dec 04, 2025 at 11:43:36AM +0900, Nakamura Shuta wrote: > Fix several typos and grammatical errors in the Bounded type documentation: > - "less significant bits" -> "least significant bits" > - "with in" -> "within" > - "withheld" -> "upheld" > - "// This" -> "// This" (double space) > - "doesn't fits" -> "doesn't fit" (2 occurrences) > > Reported-by: Miguel Ojeda > Closes: https://github.com/Rust-for-Linux/linux/issues/1210 > Link: https://github.com/Rust-for-Linux/linux/issues/1210 This prints the same link twice... Does that worth it? Regardless, Acked-by: Yury Norov (NVIDIA) > Signed-off-by: Nakamura Shuta > --- > rust/kernel/num/bounded.rs | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/rust/kernel/num/bounded.rs b/rust/kernel/num/bounded.rs > index f870080af..c3ee79ba9 100644 > --- a/rust/kernel/num/bounded.rs > +++ b/rust/kernel/num/bounded.rs > @@ -40,11 +40,11 @@ fn fits_within(value: T, num_bits: u32) -> bool { > fits_within!(value, T, num_bits) > } > > -/// An integer value that requires only the `N` less significant bits of the wrapped type to be > +/// An integer value that requires only the `N` least significant bits of the wrapped type to be > /// encoded. > /// > /// This limits the number of usable bits in the wrapped integer type, and thus the stored value to > -/// a narrower range, which provides guarantees that can be useful when working with in e.g. > +/// a narrower range, which provides guarantees that can be useful when working within e.g. > /// bitfields. > /// > /// # Invariants > @@ -56,7 +56,7 @@ fn fits_within(value: T, num_bits: u32) -> bool { > /// # Examples > /// > /// The preferred way to create values is through constants and the [`Bounded::new`] family of > -/// constructors, as they trigger a build error if the type invariants cannot be withheld. > +/// constructors, as they trigger a build error if the type invariants cannot be upheld. > /// > /// ``` > /// use kernel::num::Bounded; > @@ -82,7 +82,7 @@ fn fits_within(value: T, num_bits: u32) -> bool { > /// ``` > /// use kernel::num::Bounded; > /// > -/// // This succeeds because `15` can be represented with 4 unsigned bits. > +/// // This succeeds because `15` can be represented with 4 unsigned bits. > /// assert!(Bounded::::try_new(15).is_some()); > /// > /// // This fails because `16` cannot be represented with 4 unsigned bits. > @@ -221,7 +221,7 @@ fn fits_within(value: T, num_bits: u32) -> bool { > /// let v: Option> = 128u32.try_into_bounded(); > /// assert_eq!(v.as_deref().copied(), Some(128)); > /// > -/// // Fails because `128` doesn't fits into 6 bits. > +/// // Fails because `128` doesn't fit into 6 bits. > /// let v: Option> = 128u32.try_into_bounded(); > /// assert_eq!(v, None); > /// ``` > @@ -501,7 +501,7 @@ fn deref(&self) -> &Self::Target { > /// let v: Option> = 128u32.try_into_bounded(); > /// assert_eq!(v.as_deref().copied(), Some(128)); > /// > -/// // Fails because `128` doesn't fits into 6 bits. > +/// // Fails because `128` doesn't fit into 6 bits. > /// let v: Option> = 128u32.try_into_bounded(); > /// assert_eq!(v, None); > /// ``` > -- > 2.51.0