[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCHoI2Em6M2Y8QdD@pollux>
Date: Mon, 12 May 2025 14:22:59 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Lyude Paul <lyude@...hat.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Asahi Lina <lina@...hilina.net>
Subject: Re: [PATCH 3/4] rust: drm: gem: s/into_gem_obj()/as_gem_obj()/
On Thu, May 01, 2025 at 02:33:18PM -0400, Lyude Paul wrote:
> There's a few changes here:
> * The rename, of course (this should also let us drop the clippy annotation
> here)
> * Return *mut bindings::drm_gem_object instead of
> &Opaque<bindings::drm_gem_object> - the latter doesn't really have any
> benefit and just results in conversion from the rust type to the C type
> having to be more verbose than necessary.
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
> ---
> rust/kernel/drm/gem/mod.rs | 21 +++++++--------------
> 1 file changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs
> index f70531889c21f..55b2f1d056c39 100644
> --- a/rust/kernel/drm/gem/mod.rs
> +++ b/rust/kernel/drm/gem/mod.rs
> @@ -42,8 +42,7 @@ pub trait IntoGEMObject: Sized + super::private::Sealed {
>
> /// Returns a reference to the raw `drm_gem_object` structure, which must be valid as long as
> /// this owning object is valid.
> - #[allow(clippy::wrong_self_convention)]
> - fn into_gem_obj(&self) -> &Opaque<bindings::drm_gem_object>;
> + fn as_gem_obj(&self) -> *mut bindings::drm_gem_object;
Maybe just as_raw()? Either way,
Reviewed-by: Danilo Krummrich <dakr@...nel.org>
Powered by blists - more mailing lists