lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUGbJ7IiFd1T9QZr@yury>
Date: Tue, 16 Dec 2025 12:47:19 -0500
From: Yury Norov <yury.norov@...il.com>
To: Nakamura Shuta <nakamura.shuta@...il.com>
Cc: Alexandre Courbot <acourbot@...dia.com>,
	Miguel Ojeda <ojeda@...nel.org>, rust-for-linux@...r.kernel.org,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	Danilo Krummrich <dakr@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rust: num: fix typos in Bounded documentation

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 <ojeda@...nel.org>
> 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) <yury.norov@...dia.com>

> Signed-off-by: Nakamura Shuta <nakamura.shuta@...il.com>
> ---
>  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<T: Integer>(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<T: Integer>(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<T: Integer>(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::<u8, 4>::try_new(15).is_some());
>  ///
>  /// // This fails because `16` cannot be represented with 4 unsigned bits.
> @@ -221,7 +221,7 @@ fn fits_within<T: Integer>(value: T, num_bits: u32) -> bool {
>  /// let v: Option<Bounded<u16, 8>> = 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<Bounded<u16, 6>> = 128u32.try_into_bounded();
>  /// assert_eq!(v, None);
>  /// ```
> @@ -501,7 +501,7 @@ fn deref(&self) -> &Self::Target {
>  /// let v: Option<Bounded<u16, 8>> = 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<Bounded<u16, 6>> = 128u32.try_into_bounded();
>  /// assert_eq!(v, None);
>  /// ```
> -- 
> 2.51.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ