All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Geert Uytterhoeven" <geert@linux-m68k.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY
Date: Mon, 24 Aug 2026 15:22:07 +0000	[thread overview]
Message-ID: <20260824152208.1F0811F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260824151230.XuHT5veUT8Oi5un54yAsIsxDMMalaTNf64h7qW1s0ow@z>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Missing explicit Kconfig dependencies in `.kunitconfig` causes the test to be silently dropped.
- [Medium] Adding a tristate dependency to a `bool` config causes Kconfig warnings and hides the configuration prompt when DRM is a module.
--

--- Patch [1]: [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY ---
commit ffd08cabf5088a2a96497e1ac48e8e50484ee037
Author: Geert Uytterhoeven <geert@linux-m68k.org>

gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY

This commit changes the Kconfig rules for GPU_BUDDY_KUNIT_TEST to depend on
GPU_BUDDY rather than selecting it. It also adds a dependency on DRM or
COMPILE_TEST for the GPU_BUDDY allocator itself.

> diff --git a/drivers/gpu/Kconfig b/drivers/gpu/Kconfig
> --- a/drivers/gpu/Kconfig
> +++ b/drivers/gpu/Kconfig
> @@ -1,14 +1,15 @@
>  # SPDX-License-Identifier: GPL-2.0
>  
>  config GPU_BUDDY
> -       bool
> +       bool "Page based buddy allocator for GPU memory" if KUNIT
> +       depends on DRM || COMPILE_TEST

[Severity: Medium]
Will adding a tristate dependency (DRM) to a bool config cause Kconfig
warnings?

If a kernel is configured with CONFIG_DRM=m and CONFIG_COMPILE_TEST=n, a
tristate driver that selects GPU_BUDDY will force it to y. Kconfig will
compare the selected value (y) against the dependency limit (m from DRM) and
issue an unmet direct dependencies detected warning.

Additionally, users cannot manually enable the test because Kconfig hides
prompts for bool configs when their dependencies evaluate to m.

>         help
>           A page based buddy allocator for GPU memory.
>  
>  config GPU_BUDDY_KUNIT_TEST
>         tristate "KUnit tests for GPU buddy allocator" if !KUNIT_ALL_TESTS
>         depends on KUNIT
> -       select GPU_BUDDY
> +       depends on GPU_BUDDY

[Severity: Medium]
Does this change cause the test to be silently dropped when running kunit.py?

Because GPU_BUDDY_KUNIT_TEST now explicitly depends on GPU_BUDDY, which in
turn depends on DRM || COMPILE_TEST, if drivers/gpu/tests/.kunitconfig is
not updated to include CONFIG_DRM=y (or CONFIG_COMPILE_TEST=y) and
CONFIG_GPU_BUDDY=y, Kconfig will evaluate these unmet dependencies as n.

This will silently drop CONFIG_GPU_BUDDY_KUNIT_TEST=y from the generated
configuration during automated testing.

>         default KUNIT_ALL_TESTS
>         help
>           KUnit tests for the GPU buddy allocator.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260824151230.XuHT5veUT8Oi5un54yAsIsxDMMalaTNf64h7qW1s0ow@z?part=1

       reply	other threads:[~2026-08-24 15:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260824151230.XuHT5veUT8Oi5un54yAsIsxDMMalaTNf64h7qW1s0ow@z>
2026-08-24 15:22 ` sashiko-bot [this message]
2026-08-24 15:11 [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY Geert Uytterhoeven
2026-08-24 15:12 ` Geert Uytterhoeven
2026-08-24 15:20 ` sashiko-bot
2026-08-25 11:32 ` Krzysztof Niemiec
2026-08-25 12:15   ` Geert Uytterhoeven
2026-08-26 16:39     ` Krzysztof Niemiec
2026-08-27  7:44       ` Geert Uytterhoeven
2026-08-25 14:24 ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260824152208.1F0811F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.