Re: [PATCH 01/10] rust: Move property_present to property.rs

Andrew Ballance
2025-03-26T20:58:59Z

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