Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krzysztof Karas" <krzysztof.karas@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests
Date: Tue, 18 Aug 2026 10:05:36 +0000	[thread overview]
Message-ID: <20260818100536.C5C7E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818095624.3254368-2-krzysztof.karas@intel.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Replacing `pr_err()` and `pr_debug()` with `drm_err(NULL, ...)` and `drm_dbg(NULL, ...)` in mock selftests pollutes the kernel log with `(NULL device *)` boilerplate.
- [Low] Incorrect indentation on `err = expect_pfn_sgtable(...);`.
- [Low] Renaming the `ignored` parameter to `arg` without using it reduces code clarity.
--

--- Patch [1]: [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests ---
commit bac5b0f26375c24916b2bc63bce26e485e392abc
Author: Krzysztof Karas <krzysztof.karas@intel.com>

    drm/i915/selftests: Use drm_* prints in mock selftests

This commit replaces generic pr_* prints with drm_* versions in the mock
selftests to be more device context aware.

> diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
> index 6a305322e30db..462704e575f5b 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c
[ ... ]
> @@ -107,7 +109,7 @@ static int test_dag(void *arg)
>  		return -ENOMEM;
>  
>  	if (i915_sw_fence_await_sw_fence_gfp(A, A, GFP_KERNEL) != -EINVAL) {
> -		pr_err("recursive cycle not detected (AA)\n");
> +		drm_err(NULL, "recursive cycle not detected (AA)\n");

[Severity: Medium]
Will passing NULL to drm_err() here and elsewhere result in the log being
polluted with "(NULL device *)" boilerplate? Since mock selftests typically
run without a real device context, does using drm_err(NULL, ...) actually
provide the context mentioned in the commit message, or does it just
degrade the log output formatting?

[ ... ]
> diff --git a/drivers/gpu/drm/i915/selftests/scatterlist.c b/drivers/gpu/drm/i915/selftests/scatterlist.c
> index 7e59591bbed6c..d8fbe5a8060b6 100644
> --- a/drivers/gpu/drm/i915/selftests/scatterlist.c
> +++ b/drivers/gpu/drm/i915/selftests/scatterlist.c
[ ... ]
> @@ -275,7 +281,7 @@ static const npages_fn_t npages_funcs[] = {
>  	NULL,
>  };
>  
> -static int igt_sg_alloc(void *ignored)
> +static int igt_sg_alloc(void *arg)

[Severity: Low]
This isn't a bug, but renaming the parameter from "ignored" to "arg" makes
it less obvious that the parameter is intentionally unused. Is there a
reason this was changed?

[ ... ]
> @@ -305,7 +311,7 @@ static int igt_sg_alloc(void *ignored)
>  
>  				prandom_seed_state(&prng,
>  						   i915_selftest.random_seed);
> -				err = expect_pfn_sgtable(&pt, *npages, &prng,
> +					err = expect_pfn_sgtable(&pt, *npages, &prng,

[Severity: Low]
This isn't a bug, but it looks like this line was accidentally indented
with an extra tab, causing it to misalign with the surrounding code.

>  							 "sg_alloc_table",
>  							 end_time);
>  				sg_free_table(&pt.st);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260818095624.3254368-1-krzysztof.karas@intel.com?part=1

  reply	other threads:[~2026-08-18 10:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  9:56 [PATCH v2 0/8] drm/i915/selftests: Modernize printing in i915 selftests Krzysztof Karas
2026-08-18  9:56 ` [PATCH v2 1/8] drm/i915/selftests: Use drm_* prints in mock selftests Krzysztof Karas
2026-08-18 10:05   ` sashiko-bot [this message]
2026-08-24  7:10   ` Janusz Krzysztofik
2026-08-18  9:56 ` [PATCH v2 2/8] drm/i915/selftest: Fix a typo in alloc_workqueue call Krzysztof Karas
2026-08-24  7:11   ` Janusz Krzysztofik
2026-08-18  9:56 ` [PATCH v2 3/8] drm/i915/selftests: Use drm_* prints in live selftests Krzysztof Karas
2026-08-24  8:31   ` Janusz Krzysztofik
2026-08-18  9:56 ` [PATCH v2 4/8] drm/i915/selftests: Use drm_* prints in selftest helpers Krzysztof Karas
2026-08-18  9:56 ` [PATCH v2 5/8] drm/i915/gt/selftests: Use drm_* prints in aggregated gt selftests Krzysztof Karas
2026-08-18  9:56 ` [PATCH v2 6/8] drm/i915/gt/selftests: Use drm_* prints in gt standalone tests Krzysztof Karas
2026-08-18  9:56 ` [PATCH v2 7/8] drm/i915/gt/selftests: Use drm_* prints in gt selftest helpers Krzysztof Karas
2026-08-18  9:56 ` [PATCH v2 8/8] drm/i915/selftests: Use drm_* prints in selftest headers Krzysztof Karas
2026-08-18 10:08   ` sashiko-bot
2026-08-18 10:09   ` Krzysztof Karas
2026-08-18 11:42 ` ✗ i915.CI.BAT: failure for drm/i915/selftests: Modernize printing in i915 selftests (rev3) Patchwork

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=20260818100536.C5C7E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=krzysztof.karas@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox