public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] drivers: base: Don't match device with NULL of_node/fwnode/etc + tests
@ 2024-12-16 20:11 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
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Brian Norris @ 2024-12-16 20:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Maxime Ripard, linux-acpi, Rae Moar, Rob Herring, David Gow,
	linux-kselftest, Rafael J. Wysocki, kunit-dev, linux-kernel,
	Brian Norris

This series:
1. makes the behavior of_find_device_by_node(),
   bus_find_device_by_of_node(), bus_find_device_by_fwnode(), etc., more
   consistent when provided with a NULL node/handle;
2. adds kunit tests to validate the new NULL-argument behavior; and
3. makes some related improvements and refactoring for the drivers/base/
   kunit tests.

This series aims to prevent problems like the ones resolved in commit
5c8418cf4025 ("PCI/pwrctrl: Unregister platform device only if one
actually exists").

Changes in v3:
 * Fix potential leak in test error case

Changes in v2:
 * CC LKML (oops!)
 * Keep "devm" and "match" tests in separate suites

Brian Norris (3):
  drivers: base: Don't match devices with NULL of_node/fwnode/etc
  drivers: base: test: Enable device model tests with KUNIT_ALL_TESTS
  drivers: base: test: Add ...find_device_by...(... NULL) tests

 drivers/base/core.c                      |  8 ++---
 drivers/base/test/Kconfig                |  1 +
 drivers/base/test/platform-device-test.c | 41 +++++++++++++++++++++++-
 3 files changed, 45 insertions(+), 5 deletions(-)

-- 
2.47.1.613.gc27f4b7a9f-goog


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-20 17:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox