From nobody Fri Dec 19 19:25:24 2025 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 763D0243951 for ; Thu, 4 Dec 2025 02:44:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764816266; cv=none; b=HFQW2PbW0tFanVl8mxr9rKxJ4mhx+Zbphy4G4LeoQ1j+qfSRZkynH1HxmbNC/jM30SNymco5cdaYT9/A12rrtAfUdIP4X04fyIdpRX39qcBSwVRahEoylFPkqlax2RUX2fKUfX+OMrZ1nrz2m7G98rl91X7e0MHETksB56odI3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764816266; c=relaxed/simple; bh=R9Itk2r0ZY9WI/5KEEWDRBPmHQ3/RCrN7LiJpYe7X9c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=baK/M8V9dlEsVv/GabuC69qry+tnAfJ2c/pbMekFeE/etcYJ/2PVWAJmrdRKax/fEgtsF48j/D+lwWzx+fWgz8wZc493gFVen7iFC2C5jJZQ6TW1Y3LcQ7vsY92x3UAz4eaowEUEC3BWICc/l0xaKPeRnrpTHrm4C5WK0akFG1E= 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=SRF7l6HH; arc=none smtp.client-ip=209.85.214.178 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="SRF7l6HH" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2984dfae0acso7707135ad.0 for ; Wed, 03 Dec 2025 18:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764816265; x=1765421065; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=axOHePUdMjXEL0yOaxPqWBLsDVcl/Dx1M9GLCFD3Il4=; b=SRF7l6HHXVCI+DlR04o21k5apcZcmJ2FAnrcaWpxWaRF63s0DXeKhnZPM4sj6DHzB1 78dtmh5MU2Fa+043Xl7Hi0YXzYhheh3ef+IatQJc3juR/Rcq/nr2L05zOSz6VlXYsBr2 C53aLTyp/K34vqWRpUxCl0gwxXsR7SCQX9Ds/UWMOMEuFU18khX15Ui9WzVNnCSwjQuJ 0U8Z4a84/TVlArNkvzBSej/IsR5+Fi5V78yAj+V1GgJkrc1nVsvc7h9M3vmEdb5Cajag /UlWZrYut4i5vX6mREch4RyTJiUAWmBa+PCTtmNU1fIZXaObJvjr6wsVY6cCk9G9J4bc ftZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764816265; x=1765421065; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=axOHePUdMjXEL0yOaxPqWBLsDVcl/Dx1M9GLCFD3Il4=; b=GYZMgo0IkDYZ5FYmdnQ774eDfOOwcdCKam4iKkMUgvU9OU5yrJoJ1HmifgoGGIzTPd QwRv4SBfPz/QrRKb5PpgpGtJhaMx1F8F1UJ/zrcLa1/krOW7M2jBES5k+rK7vm/R/Q/y 9+Zh5TS+sBuEWjD7/2V+3ovL7bJshfvZsA1+p16NKQ781lWpLcr1qlJ+260WjsnjwqF+ lkWKz/Jwx0V3Z8XxMw5Goz3FijkBdvlghqDx3pcbucTmEM7YKsUXd2EeC4Mi42ZwpwLu 9+x3ov7gC3rgeEnuH7v8czhi2CseeBAA9HIg1YytDkcDU6nTBPBlN1Qc1YDDJ39VXmYt PEqw== X-Forwarded-Encrypted: i=1; AJvYcCWHaR2wYbRSwfuxolkY3gemPJm4WG6qsIyYa9/ftF+3M9FEiO5x/IZIThN5wFzy3fgNgkDYqRbFdUAyPjA=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2zfsEk9jVAmyXU9Vq+sBlZviMmicpUuDfwFQo0ztU5EkFM6NU TiLBIBb7fpVDtjeOTOpEOE8KNdsGFugfIn+NhdZBRk+6bQ/UuH/wXxBe X-Gm-Gg: ASbGncujYoOOzGGrcnIHOYBu/o5RRVRGMztKYeLmFtrkV3dimAIPKSVMjqacZz4RjRU Td4GtrMxyOwt84DmIrD2B77p3QX4GGeKzmm0vqiwjPVUWuzwAFR3nAQ2DAsS1aYbSiCtv0q32oN Kq9DcaPsx+GbWIXlTs22Ylxa183r/U1DGrpKpbuKnGF+VB6TYvgAmHyaAd2TZBPm8PeA7auz6C6 ejgxMGv8BhfPx5zIcnB8VvCNMiY8Nf60heNKJj0rrCun9MGTrov8vlUuth+uiCf5hsFpuVJXxDJ k0meexWmFoRGH89Bif5i3BU35E20/49UCGswHD6p7BJEbzMHLadIKyQpHJaiqjErjPi91mMjOoo F6khPy6lyf+o4kVFQvYap9fHWJMzkmDvB+GCu0XjgHophPyGBfBs1WlqbebmNqPnM5X33LdWx0e aqeIT5/NBJh7IautWUc9TnZ4PG91jqTdTj/2BW5sskuujuVgW2qmQ= X-Google-Smtp-Source: AGHT+IE/1oRW7djj3PF3lllhD2jsqIUJ4YnrzZc5/HveUGINDV6PilKjKnA12B11wB2yhwFfIGW+4Q== X-Received: by 2002:a17:903:1c7:b0:29b:ab3b:70c6 with SMTP id d9443c01a7336-29da1ebb12dmr16881485ad.30.1764816264563; Wed, 03 Dec 2025 18:44:24 -0800 (PST) Received: from ubuntu (softbank060152129044.bbtec.net. [60.152.129.44]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-bf6a1306ce0sm108330a12.17.2025.12.03.18.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 18:44:24 -0800 (PST) From: Nakamura Shuta To: Alexandre Courbot , Miguel Ojeda , rust-for-linux@vger.kernel.org Cc: Yury Norov , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , linux-kernel@vger.kernel.org, Nakamura Shuta Subject: [PATCH] rust: num: fix typos in Bounded documentation Date: Thu, 4 Dec 2025 11:43:36 +0900 Message-ID: <20251204024336.246587-1-nakamura.shuta@gmail.com> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Nakamura Shuta Acked-by: Alexandre Courbot Acked-by: Yury Norov (NVIDIA) --- 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) } =20 -/// An integer value that requires only the `N` less significant bits of t= he 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 wo= rking with in e.g. +/// a narrower range, which provides guarantees that can be useful when wo= rking within e.g. /// bitfields. /// /// # Invariants @@ -56,7 +56,7 @@ fn fits_within(value: T, num_bits: u32) -> bo= ol { /// # Examples /// /// The preferred way to create values is through constants and the [`Boun= ded::new`] family of -/// constructors, as they trigger a build error if the type invariants can= not be withheld. +/// constructors, as they trigger a build error if the type invariants can= not be upheld. /// /// ``` /// use kernel::num::Bounded; @@ -82,7 +82,7 @@ fn fits_within(value: T, num_bits: u32) -> bo= ol { /// ``` /// 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> =3D 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> =3D 128u32.try_into_bounded(); /// assert_eq!(v, None); /// ``` @@ -501,7 +501,7 @@ fn deref(&self) -> &Self::Target { /// let v: Option> =3D 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> =3D 128u32.try_into_bounded(); /// assert_eq!(v, None); /// ``` --=20 2.51.0