Re: [PATCH 01/10] rust: Move property_present to property.rs
From: Andrew Ballance
Date: Wed Mar 26 2025 - 16:59:45 EST
On Wed, Mar 26, 2025 at 12:13 PM Remo Senekowitsch Wrote:
> + // SAFETY: `fwnode_handle` is valid. Its lifetime is tied to `&self`. We
> + // return a reference instead of an `ARef<FwNode>` because `dev_fwnode()`
> + // doesn't increment the refcount.
> + unsafe { &*fwnode_handle.cast() }
this safety comment should say why it is safe to cast from a
struct fwnode_handle* to a *const FwNode
Andrew