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

From: Andy Shevchenko
Date: Thu Mar 27 2025 - 04:37:58 EST


On Wed, Mar 26, 2025 at 06:13:40PM +0100, Remo Senekowitsch wrote:
> Not all property-related APIs can be exposed directly on a device.
> For example, iterating over child nodes of a device will yield
> fwnode_handle. Thus, in order to access properties on these child nodes,
> the APIs has to be duplicated on a fwnode as they are in C.
>
> A related discussion can be found on the R4L Zulip[1].
>
> [1] https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/DS90UB954.20driver.20done.2C.20ready.20to.20upstream.3F/near/505415697

You can make the above to be a Link tag like

Link: ... [1]

> Signed-off-by: Remo Senekowitsch <remo@xxxxxxxxxxx>

...

> +struct fwnode_handle *rust_helper_dev_fwnode(struct device *dev)
> +{
> + return dev_fwnode(dev);
> +}

Why not const? For most of the property retrieval APIs the parameter is const.

--
With Best Regards,
Andy Shevchenko