From: Dan Carpenter <error27@gmail.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: [bug report] drm/xe/reg_sr: Allow register_save_restore_check debugfs to verify LRC values
Date: Thu, 23 Apr 2026 10:07:50 +0300 [thread overview]
Message-ID: <aenFRrHqX-d1_hUs@stanley.mountain> (raw)
Hello Matt Roper,
Commit 764af38af22a ("drm/xe/reg_sr: Allow
register_save_restore_check debugfs to verify LRC values") from Feb
18, 2026 (linux-next), leads to the following Smatch static checker
warning:
drivers/gpu/drm/xe/xe_reg_sr.c:272 xe_reg_sr_lrc_check()
error: uninitialized symbol 'val'.
drivers/gpu/drm/xe/xe_reg_sr.c
257 void xe_reg_sr_lrc_check(struct xe_reg_sr *sr,
258 struct xe_gt *gt,
259 struct xe_hw_engine *hwe,
260 struct drm_printer *p)
261 {
262 struct xe_reg_sr_entry *entry;
263 unsigned long offset;
264
265 xa_for_each(&sr->xa, offset, entry) {
266 u32 val;
267 int ret = xe_lrc_lookup_default_reg_value(gt, hwe->class, offset, &val);
268 u32 mask = entry->clr_bits | entry->set_bits;
269
270 if (ret == -ENOENT)
Smatch wants -EINVAL to be handled as well...
271 drm_printf(p, "%#8lx :: not found in LRC for %s\n", offset, hwe->name);
--> 272 else if ((val & mask) != entry->set_bits)
Otherwise it says that val isn't initialized.
273 drm_printf(p, "%#8lx & %#10x :: expected %#10x got %#10x\n",
274 offset, mask, entry->set_bits, val & mask);
275 }
276 }
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
reply other threads:[~2026-04-23 7:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=aenFRrHqX-d1_hUs@stanley.mountain \
--to=error27@gmail.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox