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] [thread-next>] [day] [month] [year] [list]
Message-Id: <DBBPYV1YV97X.OT2SPH3R67RS@kernel.org>
Date: Mon, 14 Jul 2025 12:51:52 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Rhys Lloyd" <krakow20@...il.com>, <acourbot@...dia.com>,
 <dakr@...nel.org>
Cc: <rust-for-linux@...r.kernel.org>, <airlied@...il.com>,
 <simona@...ll.ch>, <nouveau@...ts.freedesktop.org>,
 <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpu: nova-core: vbios: change PmuLookupTableEntry to
 relax alignment

On Mon Jul 14, 2025 at 12:43 PM CEST, Rhys Lloyd wrote:
> +
> +    /// Construct a u32 from `self.data`.
> +    fn get_data(&self) -> u32 {

Getters in Rust usually don't start with `get_`. Using `data(&self)`
here also looks better IMO.

---
Cheers,
Benno

> +        u32::from_le_bytes(self.data)
> +    }
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ