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: <ab9b34381f6d5889e978bef352b923455b475ae6.camel@nvidia.com>
Date: Mon, 10 Mar 2025 20:46:43 +0000
From: Timur Tabi <ttabi@...dia.com>
To: "tmgross@...ch.edu" <tmgross@...ch.edu>, "bjorn3_gh@...tonmail.com"
	<bjorn3_gh@...tonmail.com>, "benno.lossin@...ton.me"
	<benno.lossin@...ton.me>, John Hubbard <jhubbard@...dia.com>,
	"gary@...yguo.net" <gary@...yguo.net>, "a.hindborg@...nel.org"
	<a.hindborg@...nel.org>, "simona@...ll.ch" <simona@...ll.ch>,
	"airlied@...il.com" <airlied@...il.com>, "boqun.feng@...il.com"
	<boqun.feng@...il.com>, "dakr@...nel.org" <dakr@...nel.org>,
	"alex.gaynor@...il.com" <alex.gaynor@...il.com>, "aliceryhl@...gle.com"
	<aliceryhl@...gle.com>, Ben Skeggs <bskeggs@...dia.com>, Alexandre Courbot
	<acourbot@...dia.com>, "ojeda@...nel.org" <ojeda@...nel.org>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>
Subject: Re: [PATCH RFC v2 1/5] rust: add useful ops for u64

On Tue, 2025-03-04 at 22:53 +0900, Alexandre Courbot wrote:
> +/// Useful operations for `u64`.
> +pub trait U64Ext {
> +    /// Build a `u64` by combining its `high` and `low` parts.
> +    ///
> +    /// ```
> +    /// use kernel::num::U64Ext;
> +    /// assert_eq!(u64::from_u32s(0x01234567, 0x89abcdef),
> 0x01234567_89abcdef);
> +    /// ```
> +    fn from_u32s(high: u32, low: u32) -> Self;
> +
> +    fn upper_32_bits(self) -> u32;
> +    fn lower_32_bits(self) -> u32;
> +}

This generates a few warnings when I build it:

  RUSTC L rust/kernel.o
warning: missing documentation for a method
  --> rust/kernel/num.rs:15:5
   |
15 |     fn upper_32_bits(self) -> u32;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: requested on the command line with `-W missing-docs`

warning: missing documentation for a method
  --> rust/kernel/num.rs:16:5
   |
16 |     fn lower_32_bits(self) -> u32;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: missing documentation for a function
  --> rust/kernel/num.rs:33:1
   |
33 | pub const fn upper_32_bits(v: u64) -> u32 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: missing documentation for a function
  --> rust/kernel/num.rs:37:1
   |
37 | pub const fn lower_32_bits(v: u64) -> u32 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: missing documentation for a function
  --> rust/kernel/num.rs:41:1
   |
41 | pub const fn u32s_to_u64(high: u32, low: u32) -> u64 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: 5 warnings emitted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ