Re: [PATCH v8 0/9] More Rust bindings for device property reads
From: Danilo Krummrich
Date: Thu Jun 12 2025 - 19:31:24 EST
On Wed, Jun 11, 2025 at 12:28:59PM +0200, Remo Senekowitsch wrote:
> Remo Senekowitsch (9):
> rust: device: Create FwNode abstraction for accessing device
> properties
> rust: device: Enable accessing the FwNode of a Device
> rust: device: Move property_present() to FwNode
> rust: device: Enable printing fwnode name and path
> rust: device: Introduce PropertyGuard
> rust: device: Implement accessors for firmware properties
> samples: rust: platform: Add property read examples
Applied to driver-core-testing, thanks!
Once the patches passed 0-day testing they will be merged into driver-core-next.
> rust: device: Add child accessor and iterator
> rust: device: Add property_get_reference_args
I did drop those two patches for now, because:
(1) They're basically dead code.
(2) It seems that FwNode::property_get_reference_args() leaks a struct
fwnode_handle reference. property_get_reference_args() explicitly says
that the caller is responsible "for calling fwnode_handle_put() on the
returned @args->fwnode pointer", which doesn't seem to happen.
Can you please fix the leak and resend those two patches with an additional one
that adds a sample usage of the introduced methods to the platform sample
driver?