From: "Michał Grzelak" <michal.grzelak@intel.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Imre Deak <imre.deak@intel.com>,
intel-xe@lists.freedesktop.org,
Jonathan Cavitt <jonathan.cavitt@intel.com>
Subject: Re: [bug report] drm/i915/kunit: DP link: add fallback tests
Date: Wed, 19 Aug 2026 09:33:15 +0200 (CEST) [thread overview]
Message-ID: <48681343-ec61-3b57-d39b-8f353048cbaa@intel.com> (raw)
In-Reply-To: <aoVX1vP6u291ElZW@stanley.mountain>
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
Hi Dan,
On Wed, 19 Aug 2026, Dan Carpenter wrote:
> Hello Imre Deak,
>
> Commit 4fee95d4f887 ("drm/i915/kunit: DP link: add fallback tests")
> from Jul 1, 2026 (linux-next), leads to the following Smatch static
> checker warning:
>
> drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c:1223 get_fallback_config()
> warn: ignoring unreachable code.
>
> drivers/gpu/drm/i915/display/tests/intel_dp_link_test.c
> 1210 static bool get_fallback_config(const struct test_config_table *expected_table,
> 1211 enum intel_output_type output_type,
> 1212 const struct intel_dp_link_config *target_config,
> 1213 struct intel_dp_link_config *fallback_config)
> 1214 {
> 1215 struct kunit *test = expected_table->test;
> 1216 const struct link_config_set *config_set =
> 1217 get_fallback_configs_for_output_type(test, output_type);
> 1218 int i;
> 1219
> 1220 i = lookup_config(config_set, target_config);
> 1221 KUNIT_ASSERT_GE(test, i, 0);
> 1222
> --> 1223 for (i--; i >= 0; i--) {
> 1224 const struct intel_dp_link_config *config =
> 1225 &config_set->entries[i];
> 1226
> 1227 assert_config_is_supported(expected_table, config);
> 1228 *fallback_config = *config;
> 1229
> 1230 return true;
>
> This return statement means this for loop doesn't loop.
Same applies for get_target_config(); there is a fix under review for
both [1].
BR,
Michał
[1] https://lore.kernel.org/intel-gfx/20260812141300.184053-1-jonathan.cavitt@intel.com
>
> 1231 }
> 1232
> 1233 return false;
> 1234 }
>
> This email is a free service from the Smatch-CI project [smatch.sf.net].
>
> regards,
> dan carpenter
>
prev parent reply other threads:[~2026-08-19 7:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 7:14 [bug report] drm/i915/kunit: DP link: add fallback tests Dan Carpenter
2026-08-19 7:33 ` Michał Grzelak [this message]
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=48681343-ec61-3b57-d39b-8f353048cbaa@intel.com \
--to=michal.grzelak@intel.com \
--cc=error27@gmail.com \
--cc=imre.deak@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
/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.