All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: [bug report] drm/i915/kunit: DP link: add fallback tests
Date: Wed, 19 Aug 2026 10:14:30 +0300	[thread overview]
Message-ID: <aoVX1vP6u291ElZW@stanley.mountain> (raw)

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.

    1231         }
    1232 
    1233         return false;
    1234 }

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

             reply	other threads:[~2026-08-19  7:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  7:14 Dan Carpenter [this message]
2026-08-19  7:33 ` [bug report] drm/i915/kunit: DP link: add fallback tests Michał Grzelak

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=aoVX1vP6u291ElZW@stanley.mountain \
    --to=error27@gmail.com \
    --cc=imre.deak@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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.