From: Dan Carpenter <dan.carpenter@linaro.org>
To: Alexandru Dadu <alexandru.dadu@imgtec.com>
Cc: dri-devel@lists.freedesktop.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [bug report] drm/imagination: Add gpuid module parameter
Date: Fri, 6 Feb 2026 16:39:30 +0300 [thread overview]
Message-ID: <aYXvElClUKW_DY_I@stanley.mountain> (raw)
In-Reply-To: <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
[ Smatch checking is paused while we raise funding. #SadFace
https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]
Hello Alexandru Dadu,
Commit 3bf74137340a ("drm/imagination: Add gpuid module parameter")
from Jan 13, 2026 (linux-next), leads to the following Smatch static
checker warning:
drivers/gpu/drm/imagination/pvr_device.c:485 pvr_gpuid_decode_string()
warn: error code type promoted to positive: 'ret'
drivers/gpu/drm/imagination/pvr_device.c
475 int ret, idx = 0;
476 u16 user_bvnc_u16[4];
477 u8 dot_cnt = 0;
478
479 ret = strscpy(str_cpy, param_bvnc);
480
481 /*
482 * strscpy() should return at least a size 7 for the input to be valid.
483 * Returns -E2BIG for the case when the string is empty or too long.
484 */
--> 485 if (ret < PVR_GPUID_STRING_MIN_LENGTH) {
PVR_GPUID_STRING_MIN_LENGTH is unsigned so -E2BIG is type promoted to
positive and treated as success.
486 drm_info(drm_dev,
487 "Invalid size of the input GPU ID (BVNC): %s",
488 str_cpy);
489 return -EINVAL;
490 }
491
492 while (*param_bvnc) {
493 if (*param_bvnc == '.')
494 dot_cnt++;
495 param_bvnc++;
496 }
regards,
dan carpenter
next prev parent reply other threads:[~2026-02-06 13:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
2026-02-06 13:38 ` [bug report] drm/amdkfd: add debug set and clear address watch points operation Dan Carpenter
2026-02-06 13:39 ` Dan Carpenter [this message]
2026-02-06 13:40 ` [bug report] drm/xe: Avoid toggling schedule state to check LRC timestamp in TDR Dan Carpenter
2026-02-06 13:40 ` [bug report] drm/amd/display: Only poll analog connectors Dan Carpenter
2026-02-06 13:41 ` [bug report] drm/amdgpu: fix possible fence leaks from job structure Dan Carpenter
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=aYXvElClUKW_DY_I@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=alexandru.dadu@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox