From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [thermal:thermal/sensor-aggregation 33/34] drivers/thermal/testing/thermal_aggregation_test.c:268 aggregation_registration_failure_test() warn: passing zero to 'PTR_ERR'
Date: Thu, 12 Nov 2026 17:33:56 +0100 [thread overview]
Message-ID: <202611121720.ftygM0CU-lkp@intel.com> (raw)
Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/sensor-aggregation
head: 6f29b91e3c168a28dd44a3e59e29b030a0974f7e
commit: f9f49656cae08c1b61f553fe67982ccb6b0de63c [33/34] thermal: testing: Add KUnit coverage for zone aggregation
:::::: branch date: 27 hours ago
:::::: commit date: 2 days ago
config: sparc64-randconfig-2200-20261112 (https://download.01.org/0day-ci/archive/20261112/202611121720.ftygM0CU-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 10.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
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202611121720.ftygM0CU-lkp@intel.com/
New smatch warnings:
drivers/thermal/testing/thermal_aggregation_test.c:268 aggregation_registration_failure_test() warn: passing zero to 'PTR_ERR'
Old smatch warnings:
drivers/thermal/testing/thermal_aggregation_test.c:273 aggregation_registration_failure_test() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +268 drivers/thermal/testing/thermal_aggregation_test.c
f9f49656cae08c Daniel Lezcano 2026-11-10 259
f9f49656cae08c Daniel Lezcano 2026-11-10 260 static void aggregation_registration_failure_test(struct kunit *test)
f9f49656cae08c Daniel Lezcano 2026-11-10 261 {
f9f49656cae08c Daniel Lezcano 2026-11-10 262 struct aggregation_fixture *fixture = test->priv;
f9f49656cae08c Daniel Lezcano 2026-11-10 263 struct thermal_zone_device_ops ops = { .set_trips = aggregation_set_trips };
f9f49656cae08c Daniel Lezcano 2026-11-10 264 struct thermal_zone_device *tz;
f9f49656cae08c Daniel Lezcano 2026-11-10 265
f9f49656cae08c Daniel Lezcano 2026-11-10 266 tz = thermal_zone_device_register_with_trips("kunit-rejected", NULL, 0, NULL,
f9f49656cae08c Daniel Lezcano 2026-11-10 267 &ops, &fixture->params, 0, 0);
f9f49656cae08c Daniel Lezcano 2026-11-10 @268 KUNIT_EXPECT_EQ(test, PTR_ERR(tz), -EINVAL);
f9f49656cae08c Daniel Lezcano 2026-11-10 269 fixture->entries[0].coefficient = 1000;
f9f49656cae08c Daniel Lezcano 2026-11-10 270 tz = thermal_zone_device_register_with_trips("kunit-partial", NULL, 0, NULL,
f9f49656cae08c Daniel Lezcano 2026-11-10 271 &aggregation_destination_ops,
f9f49656cae08c Daniel Lezcano 2026-11-10 272 &fixture->params, 0, 0);
f9f49656cae08c Daniel Lezcano 2026-11-10 273 KUNIT_EXPECT_EQ(test, PTR_ERR(tz), -EINVAL);
f9f49656cae08c Daniel Lezcano 2026-11-10 274 KUNIT_EXPECT_EQ(test, fixture->entries[1].coefficient, 0);
f9f49656cae08c Daniel Lezcano 2026-11-10 275 }
f9f49656cae08c Daniel Lezcano 2026-11-10 276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-12 16: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=202611121720.ftygM0CU-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@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