From: kernel test robot <lkp@intel.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: <oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>
Subject: drivers/soc/qcom/smem_dramc.c:385 smem_dram_parse() warn: unsigned 'ver' is never less than zero.
Date: Sun, 23 Aug 2026 20:33:51 +0800 [thread overview]
Message-ID: <202608221845.sqdVtIAW-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26260251022fbc2f248a3d747a9b2b961b18d2d8
commit: 1d234eeafc56af8c9af6eee857f41a4310615e78 soc: qcom: smem: Expose DDR data from SMEM
date: 3 weeks ago
config: powerpc64-randconfig-r073-20260822 (https://download.01.org/0day-ci/archive/20260822/202608221845.sqdVtIAW-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 8.5.0
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 1d234eeafc56 ("soc: qcom: smem: Expose DDR data from SMEM")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608221845.sqdVtIAW-lkp@intel.com/
smatch warnings:
drivers/soc/qcom/smem_dramc.c:385 smem_dram_parse() warn: unsigned 'ver' is never less than zero.
vim +/ver +385 drivers/soc/qcom/smem_dramc.c
370
371 struct dentry *smem_dram_parse(struct qcom_smem *smem, struct device *dev)
372 {
373 struct dentry *debugfs_dir;
374 enum ddr_info_version ver;
375 struct smem_dram *dram;
376 size_t actual_size;
377 void *data;
378
379 /* No need to check qcom_smem_is_available(), this func is called by the SMEM driver */
380 data = __qcom_smem_get(smem, QCOM_SMEM_HOST_ANY, SMEM_DDR_INFO_ID, &actual_size);
381 if (IS_ERR_OR_NULL(data))
382 return ERR_PTR(-ENODATA);
383
384 ver = smem_dram_infer_struct_version(actual_size);
> 385 if (ver < 0) {
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-23 12:34 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=202608221845.sqdVtIAW-lkp@intel.com \
--to=lkp@intel.com \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@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
all inboxes | Powered by JetHome®