From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: David Gow <davidgow@google.com>,
Brian Norris <briannorris@chromium.org>,
Maxime Ripard <mripard@kernel.org>,
linux-acpi@vger.kernel.org, Rae Moar <rmoar@google.com>,
Rob Herring <robh@kernel.org>,
linux-kselftest@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v3 1/3] drivers: base: Don't match devices with NULL of_node/fwnode/etc
Date: Fri, 20 Dec 2024 18:44:05 +0100 [thread overview]
Message-ID: <2024122056-catnap-purist-a866@gregkh> (raw)
In-Reply-To: <c8e232e9-78ff-4051-995b-41454f9c4b51@linuxfoundation.org>
On Fri, Dec 20, 2024 at 10:33:51AM -0700, Shuah Khan wrote:
> On 12/18/24 22:45, David Gow wrote:
> > On Tue, 17 Dec 2024 at 04:12, Brian Norris <briannorris@chromium.org> wrote:
> > >
> > > of_find_device_by_node(), bus_find_device_by_of_node(),
> > > bus_find_device_by_fwnode(), ..., all produce arbitrary results when
> > > provided with a NULL of_node, fwnode, ACPI handle, etc. This is
> > > counterintuitive, and the source of a few bugs, such as the one fixed by
> > > commit 5c8418cf4025 ("PCI/pwrctrl: Unregister platform device only if
> > > one actually exists").
> > >
> > > It's hard to imagine a good reason that these device_match_*() APIs
> > > should return 'true' for a NULL argument. Augment these to return 0
> > > (false).
> > >
> > > Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> > > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > Signed-off-by: Brian Norris <briannorris@chromium.org>
> > > ---
> >
> > Seems sensible enough to me.
> >
> > Acked-by: David Gow <davidgow@google.com>
> >
> > I assume this series (including the KUnit test changes) will go in via Greg.
> >
>
> Works for me.
>
> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Thanks, I'll take these in a few days.
greg k-h
next prev parent reply other threads:[~2024-12-20 17:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 20:11 [PATCH v3 0/3] drivers: base: Don't match device with NULL of_node/fwnode/etc + tests Brian Norris
2024-12-16 20:11 ` [PATCH v3 1/3] drivers: base: Don't match devices with NULL of_node/fwnode/etc Brian Norris
2024-12-19 5:45 ` David Gow
2024-12-20 17:33 ` Shuah Khan
2024-12-20 17:44 ` Greg Kroah-Hartman [this message]
2024-12-16 20:11 ` [PATCH v3 2/3] drivers: base: test: Enable device model tests with KUNIT_ALL_TESTS Brian Norris
2024-12-17 7:41 ` Maxime Ripard
2024-12-19 5:45 ` David Gow
2024-12-16 20:11 ` [PATCH v3 3/3] drivers: base: test: Add ...find_device_by...(... NULL) tests Brian Norris
2024-12-19 5:45 ` David Gow
2024-12-20 17:34 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024122056-catnap-purist-a866@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=briannorris@chromium.org \
--cc=davidgow@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=rmoar@google.com \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox