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
Unified · Split
| @@ -28,7 +28,7 @@ config KUNIT_FAULT_TEST · 27 unmodified lines | |||
| 28 | bool "Enable KUnit tests which print BUG stacktraces" | 28 | bool "Enable KUnit tests which print BUG stacktraces" |
| 29 | depends on KUNIT_TEST | 29 | depends on KUNIT_TEST |
| 30 | depends on !UML | 30 | depends on !UML |
| 31 | default y | 31 | default !PANIC_ON_OOPS |
| 32 | help | 32 | help |
| 33 | Enables fault handling tests for the KUnit framework. These tests may | 33 | Enables fault handling tests for the KUnit framework. These tests may |
| 34 | trigger a kernel BUG(), and the associated stack trace, even when they | 34 | trigger a kernel BUG(), and the associated stack trace, even when they |
| @@ -106,8 +106,7 @@ EXPORT_SYMBOL_GPL(kunit_driver_create); · 105 unmodified lines | |||
| 106 | 106 | ||
| 107 | /* Helper which creates a kunit_device, attaches it to the kunit_bus*/ | 107 | /* Helper which creates a kunit_device, attaches it to the kunit_bus*/ |
| 108 | static struct kunit_device *kunit_device_register_internal(struct kunit *test, | 108 | static struct kunit_device *kunit_device_register_internal(struct kunit *test, |
| 109 | const char *name, | 109 | const char *name) |
| 110 | const struct device_driver *drv) | ||
| 111 | { | 110 | { |
| 112 | struct kunit_device *kunit_dev; | 111 | struct kunit_device *kunit_dev; |
| 113 | int err = -ENOMEM; | 112 | int err = -ENOMEM; |
| @@ -150,7 +149,7 @@ struct device *kunit_device_register_with_driver(struct kunit *test, · 36 unmodified lines | |||
| 150 | const char *name, | 149 | const char *name, |
| 151 | const struct device_driver *drv) | 150 | const struct device_driver *drv) |
| 152 | { | 151 | { |
| 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); |
| 154 | 153 | ||
| 155 | if (IS_ERR_OR_NULL(kunit_dev)) | 154 | if (IS_ERR_OR_NULL(kunit_dev)) |
| 156 | return ERR_CAST(kunit_dev); | 155 | return ERR_CAST(kunit_dev); |
| @@ -172,7 +171,7 @@ struct device *kunit_device_register(struct kunit *test, const char *name) · 15 unmodified lines | |||
| 172 | if (IS_ERR(drv)) | 171 | if (IS_ERR(drv)) |
| 173 | return ERR_CAST(drv); | 172 | return ERR_CAST(drv); |
| 174 | 173 | ||
| 175 | dev = kunit_device_register_internal(test, name, drv); | 174 | dev = kunit_device_register_internal(test, name); |
| 176 | if (IS_ERR(dev)) { | 175 | if (IS_ERR(dev)) { |
| 177 | kunit_release_action(test, driver_unregister_wrapper, (void *)drv); | 176 | kunit_release_action(test, driver_unregister_wrapper, (void *)drv); |
| 178 | return ERR_CAST(dev); | 177 | return ERR_CAST(dev); |