[PATCH v5 11/28] cxl/test: Use fw_devlink_set_device()

Herve Codina posted 28 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v5 11/28] cxl/test: Use fw_devlink_set_device()
Posted by Herve Codina 1 month, 1 week ago
The code set directly fwnode.dev field.

Use the dedicated fw_devlink_set_device() helper to perform this
operation.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
---
 tools/testing/cxl/test/cxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 3d9107b2661c..7f232a869389 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -1137,7 +1137,7 @@ static void mock_companion(struct acpi_device *adev, struct device *dev)
 	device_initialize(&adev->dev);
 	fwnode_init(&adev->fwnode, NULL);
 	device_set_node(dev, &adev->fwnode);
-	adev->fwnode.dev = dev;
+	fw_devlink_set_device(&adev->fwnode, dev);
 }
 
 #ifndef SZ_64G
-- 
2.53.0
Re: [PATCH v5 11/28] cxl/test: Use fw_devlink_set_device()
Posted by Jonathan Cameron 1 month ago
On Fri, 27 Feb 2026 14:54:08 +0100
Herve Codina <herve.codina@bootlin.com> wrote:

> The code set directly fwnode.dev field.
> 
> Use the dedicated fw_devlink_set_device() helper to perform this
> operation.
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

From practical point of view, what path do you expect this to take?
Is there urgency to make the change, or does it make more sense to
add the helper this cycle and cleanup up the various places it can be
used next?

> ---
>  tools/testing/cxl/test/cxl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index 3d9107b2661c..7f232a869389 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -1137,7 +1137,7 @@ static void mock_companion(struct acpi_device *adev, struct device *dev)
>  	device_initialize(&adev->dev);
>  	fwnode_init(&adev->fwnode, NULL);
>  	device_set_node(dev, &adev->fwnode);
> -	adev->fwnode.dev = dev;
> +	fw_devlink_set_device(&adev->fwnode, dev);
>  }
>  
>  #ifndef SZ_64G
Re: [PATCH v5 11/28] cxl/test: Use fw_devlink_set_device()
Posted by Herve Codina 1 month ago
Hi Jonathan,

On Mon, 2 Mar 2026 12:24:49 +0000
Jonathan Cameron <jonathan.cameron@huawei.com> wrote:

> On Fri, 27 Feb 2026 14:54:08 +0100
> Herve Codina <herve.codina@bootlin.com> wrote:
> 
> > The code set directly fwnode.dev field.
> > 
> > Use the dedicated fw_devlink_set_device() helper to perform this
> > operation.
> > 
> > Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> > Reviewed-by: Dave Jiang <dave.jiang@intel.com>  
> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> 
> From practical point of view, what path do you expect this to take?
> Is there urgency to make the change, or does it make more sense to
> add the helper this cycle and cleanup up the various places it can be
> used next?

I hoped to have patches 7 to 12 applied by one maintainer on his/her trees.

As it is related to fw_devlink, I expect to have them applied by a driver
core maintainer.

Any other plan can work as well.

Best regards,
Hervé