Re: [PATCH 1/2] rust/faux: Drop #[repr(transparent)] from faux::Registration
From: Fiona Behrens
Date: Wed Feb 26 2025 - 08:00:48 EST
Lyude Paul <lyude@xxxxxxxxxx> writes:
> I think this change got missed during review, we don't need
> #[repr(transparent)] since Registration just holds a single NonNull. This
> attribute had originally been added by me when I was still figuring out how
> the bindings should look like but got committed by mistake. So, just drop
> it.
>
> Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Fiona Behrens <me@xxxxxxxxxx>
> ---
> rust/kernel/faux.rs | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/rust/kernel/faux.rs b/rust/kernel/faux.rs
> index 5acc0c02d451f..41751403cd868 100644
> --- a/rust/kernel/faux.rs
> +++ b/rust/kernel/faux.rs
> @@ -19,7 +19,6 @@
> /// `self.0` always holds a valid pointer to an initialized and registered [`struct faux_device`].
> ///
> /// [`struct faux_device`]: srctree/include/linux/device/faux.h
> -#[repr(transparent)]
> pub struct Registration(NonNull<bindings::faux_device>);
>
> impl Registration {