Skip to content

Commit fa084c3

Browse files
committed
Merge tag 'linux_kselftest-kunit-fixes-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kunit fixes from Shuah Khan: "Drop unused parameter from kunit_device_register_internal and make FAULT_TEST default to n when PANIC_ON_OOPS" * tag 'linux_kselftest-kunit-fixes-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: make FAULT_TEST default to n when PANIC_ON_OOPS kunit: Drop unused parameter from kunit_device_register_internal
2 parents d571fe4 + c33b688 commit fa084c3

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

lib/kunit/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ config KUNIT_FAULT_TEST
2828
bool "Enable KUnit tests which print BUG stacktraces"
2929
depends on KUNIT_TEST
3030
depends on !UML
31-
default y
31+
default !PANIC_ON_OOPS
3232
help
3333
Enables fault handling tests for the KUnit framework. These tests may
3434
trigger a kernel BUG(), and the associated stack trace, even when they

lib/kunit/device.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ EXPORT_SYMBOL_GPL(kunit_driver_create);
106106

107107
/* Helper which creates a kunit_device, attaches it to the kunit_bus*/
108108
static struct kunit_device *kunit_device_register_internal(struct kunit *test,
109-
const char *name,
110-
const struct device_driver *drv)
109+
const char *name)
111110
{
112111
struct kunit_device *kunit_dev;
113112
int err = -ENOMEM;
@@ -150,7 +149,7 @@ struct device *kunit_device_register_with_driver(struct kunit *test,
150149
const char *name,
151150
const struct device_driver *drv)
152151
{
153-
struct kunit_device *kunit_dev = kunit_device_register_internal(test, name, drv);
152+
struct kunit_device *kunit_dev = kunit_device_register_internal(test, name);
154153

155154
if (IS_ERR_OR_NULL(kunit_dev))
156155
return ERR_CAST(kunit_dev);
@@ -172,7 +171,7 @@ struct device *kunit_device_register(struct kunit *test, const char *name)
172171
if (IS_ERR(drv))
173172
return ERR_CAST(drv);
174173

175-
dev = kunit_device_register_internal(test, name, drv);
174+
dev = kunit_device_register_internal(test, name);
176175
if (IS_ERR(dev)) {
177176
kunit_release_action(test, driver_unregister_wrapper, (void *)drv);
178177
return ERR_CAST(dev);

0 commit comments

Comments
 (0)