Hi Thara,
url:
https://github.com/0day-ci/linux/commits/Thara-Gopinath/Introduce-warming...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-randconfig-m001-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/thermal/thermal_core.c:436 handle_thermal_trip() error: uninitialized symbol
'mon_type'.
#
https://github.com/0day-ci/linux/commit/602ffc327f610db12c9657821c144d359...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Thara-Gopinath/Introduce-warming-in-thermal-framework/20200917-113050
git checkout 602ffc327f610db12c9657821c144d359c9d1f7f
vim +/mon_type +436 drivers/thermal/thermal_core.c
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 417 static void
handle_thermal_trip(struct thermal_zone_device *tz, int trip)
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 418 {
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 419 enum
thermal_trip_type type;
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 420 enum
thermal_trip_monitor_type mon_type;
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 421 int
trip_temp, hyst = 0;
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 422
81ad4276b505e98 drivers/thermal/thermal_core.c Zhang Rui 2016-03-18 423 /* Ignore
disabled trip points */
81ad4276b505e98 drivers/thermal/thermal_core.c Zhang Rui 2016-03-18 424 if
(test_bit(trip, &tz->trips_disabled))
81ad4276b505e98 drivers/thermal/thermal_core.c Zhang Rui 2016-03-18 425 return;
81ad4276b505e98 drivers/thermal/thermal_core.c Zhang Rui 2016-03-18 426
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 427
tz->ops->get_trip_temp(tz, trip, &trip_temp);
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 428
tz->ops->get_trip_type(tz, trip, &type);
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 429 if
(tz->ops->get_trip_hyst)
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 430
tz->ops->get_trip_hyst(tz, trip, &hyst);
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 431
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 432 if
(tz->ops->get_trip_mon_type)
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 433
tz->ops->get_trip_mon_type(tz, trip, &mon_type);
^^^^^^^^^
Unintialized on else path
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 434
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 435 if
(tz->last_temperature != THERMAL_TEMP_INVALID) {
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 @436 if
(mon_type == THERMAL_TRIP_MONITOR_FALLING) {
^^^^^^^^
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 437 if
(tz->last_temperature > trip_temp &&
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 438
tz->temperature <= trip_temp)
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 439
thermal_notify_tz_trip_down(tz->id, trip);
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 440 if
(tz->last_temperature <= trip_temp &&
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 441
tz->temperature > (trip_temp + hyst))
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 442
thermal_notify_tz_trip_up(tz->id, trip);
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 443 } else {
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 444 if
(tz->last_temperature < trip_temp &&
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 445
tz->temperature >= trip_temp)
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 446
thermal_notify_tz_trip_up(tz->id, trip);
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 447 if
(tz->last_temperature >= trip_temp &&
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 448
tz->temperature < (trip_temp - hyst))
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 449
thermal_notify_tz_trip_down(tz->id, trip);
55cdf0a283b8760 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 450 }
602ffc327f610db drivers/thermal/thermal_core.c Thara Gopinath 2020-09-16 451 }
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 452
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 453 if (type
== THERMAL_TRIP_CRITICAL || type == THERMAL_TRIP_HOT)
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 454
handle_critical_trips(tz, trip, type);
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 455 else
5be52fccaf3d218 drivers/thermal/thermal_core.c Lukasz Luba 2018-10-15 456
handle_non_critical_trips(tz, trip);
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 457 /*
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 458 *
Alright, we handled this trip successfully.
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 459 * So,
start monitoring again.
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 460 */
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 461
monitor_thermal_zone(tz);
0c01ebbfd3caf1d drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 462 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org