Re: [PATCH 1/2] driver core: provide device_match_fwnode_ext()

From: Danilo Krummrich

Date: Thu Feb 19 2026 - 11:55:33 EST


On Thu Feb 19, 2026 at 5:39 PM CET, Bartosz Golaszewski wrote:
> On Thu, Feb 19, 2026 at 5:36 PM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>> On Thu, Feb 19, 2026 at 05:31:22PM +0100, Bartosz Golaszewski wrote:
>> > Provide an extended variant of device_match_fwnode() that also tries to
>> > match the device's secondary fwnode.
>> >
>> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
>> > ---
>> > drivers/base/core.c | 14 ++++++++++++++
>> > include/linux/device/bus.h | 1 +
>> > 2 files changed, 15 insertions(+)
>> >
>> > diff --git a/drivers/base/core.c b/drivers/base/core.c
>> > index f599a1384eec90c104601422b04dc2b4c19d4382..bbf1337978fafc35eb94bda85e0bb7f6879879c0 100644
>> > --- a/drivers/base/core.c
>> > +++ b/drivers/base/core.c
>> > @@ -5326,6 +5326,20 @@ int device_match_fwnode(struct device *dev, const void *fwnode)
>> > }
>> > EXPORT_SYMBOL_GPL(device_match_fwnode);
>> >
>> > +int device_match_fwnode_ext(struct device *dev, const void *fwnode)
>>
>> No kernel doc to explain what this function does?
>>
>> :(
>>
>
> It's not like any of the other variants from this file were documented
> but ok, I can add it in v2. Still, I'd like to hear if this even makes
> sense.

I'd argue that the other ones are very obvious, as they just encapsulate a
single operation rather than any logic, whereas this one does have some logic.

Also, is there a reason why we need both device_match_fwnode() *and*
device_match_fwnode_ext()?