[PATCH v2] drm: fix dead default for DRM_TTM_KUNIT_TEST

Julian Braha posted 1 patch 1 week, 4 days ago
drivers/gpu/drm/Kconfig.debug | 1 -
1 file changed, 1 deletion(-)
[PATCH v2] drm: fix dead default for DRM_TTM_KUNIT_TEST
Posted by Julian Braha 1 week, 4 days ago
The DRM_TTM_KUNIT_TEST config option should default
to KUNIT_ALL_TESTS so that if all tests are enabled then
it is included, but currently the 'default KUNIT_ALL_TESTS'
statement is shadowed by an unconditional 'default n',
meaning that this second default statement is currently dead code.

This dead code was found by kconfirm, a static analysis
tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
v2: removed fixes tag
---
 drivers/gpu/drm/Kconfig.debug | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/Kconfig.debug b/drivers/gpu/drm/Kconfig.debug
index 05dc43c0b8c5..75c186f938b0 100644
--- a/drivers/gpu/drm/Kconfig.debug
+++ b/drivers/gpu/drm/Kconfig.debug
@@ -86,7 +86,6 @@ config DRM_KUNIT_TEST
 
 config DRM_TTM_KUNIT_TEST
 	tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS
-	default n
 	depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST)
 	select DRM_TTM
 	select DRM_BUDDY
-- 
2.51.2
Re: [PATCH v2] drm: fix dead default for DRM_TTM_KUNIT_TEST
Posted by Christian König 1 week, 3 days ago
On 3/23/26 13:41, Julian Braha wrote:
> The DRM_TTM_KUNIT_TEST config option should default
> to KUNIT_ALL_TESTS so that if all tests are enabled then
> it is included, but currently the 'default KUNIT_ALL_TESTS'
> statement is shadowed by an unconditional 'default n',
> meaning that this second default statement is currently dead code.
> 
> This dead code was found by kconfirm, a static analysis
> tool for Kconfig.
> 
> Signed-off-by: Julian Braha <julianbraha@gmail.com>

Reviewed and pushed to drm-misc-next.

Thanks,
Christian.

> ---
> v2: removed fixes tag
> ---
>  drivers/gpu/drm/Kconfig.debug | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/Kconfig.debug b/drivers/gpu/drm/Kconfig.debug
> index 05dc43c0b8c5..75c186f938b0 100644
> --- a/drivers/gpu/drm/Kconfig.debug
> +++ b/drivers/gpu/drm/Kconfig.debug
> @@ -86,7 +86,6 @@ config DRM_KUNIT_TEST
> 
>  config DRM_TTM_KUNIT_TEST
>         tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS
> -       default n
>         depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST)
>         select DRM_TTM
>         select DRM_BUDDY
> --
> 2.51.2
>