[<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