* [thermal:thermal/sensor-aggregation 33/34] drivers/thermal/testing/thermal_aggregation_test.c:268 aggregation_registration_failure_test() warn: passing zero to 'PTR_ERR'
@ 2026-11-12 16:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-12 16:33 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-12 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 16:33 [thermal:thermal/sensor-aggregation 33/34] drivers/thermal/testing/thermal_aggregation_test.c:268 aggregation_registration_failure_test() warn: passing zero to 'PTR_ERR' kernel test robot
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.