mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm: fix dead default for DRM_TTM_KUNIT_TEST
@ 2026-03-22 22:01 Julian Braha
  2026-03-23  9:43 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Julian Braha @ 2026-03-22 22:01 UTC (permalink / raw)
  To: mripard, maarten.lankhorst, tzimmermann, christian.koenig,
	karolina.stolarek
  Cc: airlied, simona, dri-devel, linux-kernel, Julian Braha

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.

Fixes: e3912d09bf8d ("drm/ttm: Introduce KUnit test")
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 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


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

* Re: [PATCH] drm: fix dead default for DRM_TTM_KUNIT_TEST
  2026-03-22 22:01 [PATCH] drm: fix dead default for DRM_TTM_KUNIT_TEST Julian Braha
@ 2026-03-23  9:43 ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2026-03-23  9:43 UTC (permalink / raw)
  To: Julian Braha, mripard, maarten.lankhorst, tzimmermann, karolina.stolarek
  Cc: airlied, simona, dri-devel, linux-kernel

Hi Julian,

On 3/22/26 23:01, 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.

I need to double check the discussion back then, but I think the tests were pretty beta when initially merged.

So it was intentionally to not include them automatically when KUNIT_ALL_TESTS is enabled.

We can probably do that since the tests are stable now, but I think we should definitely drop the Fixes tag.

Regards,
Christian.

> 
> This dead code was found by kconfirm, a static analysis
> tool for Kconfig.
> 
> Fixes: e3912d09bf8d ("drm/ttm: Introduce KUnit test")
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> ---
>  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
> 


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

end of thread, other threads:[~2026-03-23  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-22 22:01 [PATCH] drm: fix dead default for DRM_TTM_KUNIT_TEST Julian Braha
2026-03-23  9:43 ` Christian König

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

all inboxes | Powered by JetHome®