Re: [PATCH v2 09/26] cxl/test: Use device_set_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 May 2025 18:10:40 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> 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?




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux