On Tue, Mar 03, 2026 at 03:12:10PM +0100, Herve Codina wrote:
> On Mon, 2 Mar 2026 12:23:36 +0000
> Jonathan Cameron <jonathan.cameron@huawei.com> wrote:
> > On Fri, 27 Feb 2026 14:54:04 +0100
> > Herve Codina <herve.codina@bootlin.com> wrote:
> >
> > > Setting fwnode->dev is specific to fw_devlink.
> > >
> > > In order to avoid having a direct 'fwnode->dev = dev;' in several
> > > place in the kernel, introduce fw_devlink_set_device() helper to perform
> > > this operation.
> > >
> > I don't mind the helper, but the description could do with a little
> > detail on why. Is it just to avoid visibility of internal details, or
> > is there a stronger reason?
>
> I think the idea was to avoid visibility.
>
> It cames from feedback received on my first iteration
> https://lore.kernel.org/all/20250408145139.293c79a2@bootlin.com/
>
> I found the idea relevant and so I did the patch.
Yes, the idea is to hide the fwnode devlink related stuff behind the getters
and setters. Ideally, everything in fwnode_handle related to devlinks should
be marked as __private.
--
With Best Regards,
Andy Shevchenko