[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQiyMdvUhPQxkpmw@smile.fi.intel.com>
Date: Mon, 3 Nov 2025 15:46:25 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Krzysztof Kozlowski <krzk@...nel.org>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v4 03/10] software node: allow referencing firmware nodes
On Mon, Nov 03, 2025 at 11:36:36AM +0100, Bartosz Golaszewski wrote:
> On Mon, Nov 3, 2025 at 10:49 AM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > On Mon, Nov 03, 2025 at 10:35:23AM +0100, Bartosz Golaszewski wrote:
...
> > > +#define SOFTWARE_NODE_REF_SWNODE(_ref, ...) \
> > > + __SOFTWARE_NODE_REF(_ref, __VA_ARGS__)
> > > +
> > > +#define SOFTWARE_NODE_REF_FWNODE(_ref, ...) \
> > > + __SOFTWARE_NODE_REF(_ref, __VA_ARGS__)
> > > +
> > > +/* DEPRECATED, use SOFTWARE_NODE_REF_SWNODE() instead. */
> > > +#define SOFTWARE_NODE_REFERENCE(_ref, ...) \
> > > + SOFTWARE_NODE_REF_SWNODE(_ref, __VA_ARGS__)
> >
> > Now, useless.
>
> No, why? With these changes, SOFTWARE_NODE_REFERENCE()'s name is a bit
> misleading or incomplete, so I'm proposing to start replacing it with
> SOFTWARE_NODE_REF_SWNODE() which is compatible with the former but has
> a better name.
It's an unneeded churn. I don't see a confusion here. One may interpret
That it is a reference in a software node to another node.
...
> > > -#define PROPERTY_ENTRY_REF(_name_, _ref_, ...) \
> > > +#define __PROPERTY_ENTRY_REF(_type, _name, _ref, ...) \
> > > (struct property_entry) { \
> > > - .name = _name_, \
> > > + .name = _name, \
> > > .length = sizeof(struct software_node_ref_args), \
> > > .type = DEV_PROP_REF, \
> > > - { .pointer = &SOFTWARE_NODE_REFERENCE(_ref_, ##__VA_ARGS__), }, \
> > > + { .pointer = &_type(_ref, ##__VA_ARGS__), }, \
> > > }
> >
> > Do we need this now? I assume that _Generic() takes case of this.
> Ah, right, it should be done here as well.
Just it should work as is without changes, did I miss anything?
...
> > > +#define PROPERTY_ENTRY_REF_SWNODE(_name, _ref, ...) \
> > > + __PROPERTY_ENTRY_REF(SOFTWARE_NODE_REF_SWNODE, \
> > > + _name, _ref, __VA_ARGS__)
> > > +
> > > +#define PROPERTY_ENTRY_REF_FWNODE(_name, _ref, ...) \
> > > + __PROPERTY_ENTRY_REF(SOFTWARE_NODE_REF_FWNODE, \
> > > + _name, _ref, __VA_ARGS__)
> > > +
> > > +/* DEPRECATED, use PROPERTY_ENTRY_REF_SWNODE() instead. */
> > > +#define PROPERTY_ENTRY_REF(_name, _ref, ...) \
> > > + PROPERTY_ENTRY_REF_SWNODE(_name, _ref, __VA_ARGS__)
> >
> > Seems like useless churn.
>
> This is the same argument as with SOFTWARE_NODE_REF_SWNODE(). It's not
> clear from the name what PROPERTY_ENTRY_REF() is really referencing.
Same answer as above.
...
TL;DR: Let's leave renaming / splitting to another series. It doesn't sound
like a required thingy. Only what I see is unneeded churn.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists