* Re: [PATCH v2 09/26] cxl/test: Use device_set_node()
[not found] ` <aBt38JR-YGD5nnC4@smile.fi.intel.com>
@ 2025-05-08 11:47 ` Jonathan Cameron
0 siblings, 0 replies; only message in thread
From: Jonathan Cameron @ 2025-05-08 11:47 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Herve Codina, Andrew Lunn, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Michael Turquette,
Stephen Boyd, Andi Shyti, Wolfram Sang, Peter Rosin,
Derek Kiernan, Dragan Cvetic, Arnd Bergmann, Rob Herring,
Saravana Kannan, Bjorn Helgaas, Mark Brown, Len Brown,
Daniel Scally, Heikki Krogerus, Sakari Ailus, Wolfram Sang,
Geert Uytterhoeven, linux-kernel, imx, linux-arm-kernel,
linux-clk, linux-i2c, devicetree, linux-pci, linux-spi,
linux-acpi, Allan Nielsen, Horatiu Vultur, Steen Hegelund,
Luca Ceresoli, Thomas Petazzoni, linux-cxl, Davidlohr Bueso,
Dave Jiang, Alison Schofield, Vishal Verma, Ira Weiny,
Dan Williams, linux-cxl
On Wed, 7 May 2025 18:10:40 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> On Wed, May 07, 2025 at 09:12:51AM +0200, Herve Codina wrote:
> > The code set directly dev->fwnode.
> >
> > Use the dedicated helper to perform this operation.
>
> ...
>
> > @@ -1046,7 +1046,7 @@ static void mock_companion(struct acpi_device *adev, struct device *dev)
> > {
> > device_initialize(&adev->dev);
> > fwnode_init(&adev->fwnode, NULL);
> > - dev->fwnode = &adev->fwnode;
> > + device_set_node(dev, &adev->fwnode);
> > adev->fwnode.dev = dev;
> > }
>
> This code is questionable to begin with. Can the original author explain what
> is the motivation behind this as the only callers of fwnode_init() are deep
> core pieces _and_ this only module. Why?!
>
More likely to happen if CXL folk are +CC. Added.
Dan, maybe one for you?
^ permalink raw reply [flat|nested] only message in thread