Re: [PATCH v1 4/9] i2c: designware: Propagate firmware node

From: Andy Shevchenko
Date: Mon Jul 31 2023 - 16:09:38 EST


On Fri, Jul 28, 2023 at 03:25:58PM +0300, Jarkko Nikula wrote:
> On 7/25/23 17:30, Andy Shevchenko wrote:
> > Propagate firmware node by using a specific API call, i.e. device_set_node().

...

> > + device_set_node(&dev->adapter.dev, dev_fwnode(dev->dev));
>
> Would this be better to put in the same place where ACPI_COMPANION_SET() is
> removed like below? I'd keep this static inline function in the header file
> as simple as possible. All extra code might invite adding even more.

We come again to the duplication and prone to deviation code, I wouldn't like
to go this way. The idea of this call is to unify and avoid mistakes, like
updating only in ACPI or DT (or any new one if happens in the future) case
and leaving the second one unconsidered.

That said, I would rather drop this patch until i2c core will take this
once for all (may be never in the reasonable future :-).

--
With Best Regards,
Andy Shevchenko