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 <ly...@redhat.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 <d...@kernel.org>