Hi Rob, On Fri, 27 Jun 2025 09:18:46 -0500 Rob Herring <robh@xxxxxxxxxx> wrote: > On Fri, Jun 13, 2025 at 03:47:42PM +0200, Herve Codina wrote: > > get_dev_from_fwnode() calls get_device() and so it acquires a reference > > on the device returned. > > > > In order to be more obvious that this wrapper is a get_device() variant, > > rename it to get_device_from_fwnode(). > > > > Suggested-by: Mark Brown <broonie@xxxxxxxxxx> > > Link: https://lore.kernel.org/lkml/CAGETcx97QjnjVR8Z5g0ndLHpK96hLd4aYSV=iEkKPNbNOccYmA@xxxxxxxxxxxxxx/ > > Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx> > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > > Reviewed-by: Saravana Kannan <saravanak@xxxxxxxxxx> > > Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx> > > --- > > drivers/base/core.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/base/core.c b/drivers/base/core.c > > index cbc0099d8ef2..36ccee91ba9a 100644 > > --- a/drivers/base/core.c > > +++ b/drivers/base/core.c > > @@ -1881,7 +1881,7 @@ static void fw_devlink_unblock_consumers(struct device *dev) > > device_links_write_unlock(); > > } > > > > -#define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev) > > +#define get_device_from_fwnode(fwnode) get_device((fwnode)->dev) > > In patch 3, you add the same define. Is there some reason to not move it > to a header? > In this patch (patch 2), I rename the define. In patch 3, I move the define in an other place in the same file (core.c) in order to have it available for the function added (also in patch 3). I don't think we need to move it to a header. Best regards, Hervé