From: kernel test robot <lkp@intel.com>
To: Tao Zhang <quic_taozha@quicinc.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Suzuki K Poulose <suzuki.poulose@arm.com>
Subject: drivers/hwtracing/coresight/coresight-tpdm.c:288 dsb_mode_store() warn: unsigned 'val' is never less than zero.
Date: Mon, 9 Dec 2024 12:53:42 +0800 [thread overview]
Message-ID: <202412090231.UXsQuWrr-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7503345ac5f5e82fd9a36d6e6b447c016376403a
commit: 018e43ad1eeefbb8797e4c933953c50c09e3f4f6 coresight-tpdm: Add node to set dsb programming mode
date: 1 year, 1 month ago
config: arm64-randconfig-r073-20241207 (https://download.01.org/0day-ci/archive/20241209/202412090231.UXsQuWrr-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412090231.UXsQuWrr-lkp@intel.com/
smatch warnings:
drivers/hwtracing/coresight/coresight-tpdm.c:288 dsb_mode_store() warn: unsigned 'val' is never less than zero.
vim +/val +288 drivers/hwtracing/coresight/coresight-tpdm.c
279
280 static ssize_t dsb_mode_store(struct device *dev,
281 struct device_attribute *attr,
282 const char *buf,
283 size_t size)
284 {
285 struct tpdm_drvdata *drvdata = dev_get_drvdata(dev->parent);
286 unsigned long val;
287
> 288 if ((kstrtoul(buf, 0, &val)) || (val < 0) ||
289 (val & ~TPDM_DSB_MODE_MASK))
290 return -EINVAL;
291
292 spin_lock(&drvdata->spinlock);
293 drvdata->dsb->mode = val & TPDM_DSB_MODE_MASK;
294 spin_unlock(&drvdata->spinlock);
295 return size;
296 }
297 static DEVICE_ATTR_RW(dsb_mode);
298
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-12-09 4:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 4:53 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-14 23:52 drivers/hwtracing/coresight/coresight-tpdm.c:288 dsb_mode_store() warn: unsigned 'val' is never less than zero kernel test robot
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=202412090231.UXsQuWrr-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_taozha@quicinc.com \
--cc=suzuki.poulose@arm.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.