tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: b8a1fe5b94254945ed28a3f519e8ecd60e288871 commit: f36483a0a8c34a752816bfec1c7d2e693efbce99 [157/159] thermal: netlink: Pass thermal zone pointer to notify routines config: arm-defconfig (https://download.01.org/0day-ci/archive/20240103/202401030509.AAQGAhUF-lkp@xxxxxxxxx/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240103/202401030509.AAQGAhUF-lkp@xxxxxxxxx/reproduce) 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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202401030509.AAQGAhUF-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/thermal/thermal_core.c:1469:6: warning: variable 'tz_id' set but not used [-Wunused-but-set-variable] int tz_id; ^ 1 warning generated. vim +/tz_id +1469 drivers/thermal/thermal_core.c 7cefbaf081eb7c drivers/thermal/thermal_core.c Daniel Lezcano 2023-04-19 1462 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1463 /** a052b5118f13fe drivers/thermal/thermal_core.c Yang Yingliang 2021-05-17 1464 * thermal_zone_device_unregister - removes the registered thermal zone device 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1465 * @tz: the thermal zone device to remove 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1466 */ 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1467 void thermal_zone_device_unregister(struct thermal_zone_device *tz) 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1468 { ded2d383b1b441 drivers/thermal/thermal_core.c Zhang Rui 2023-03-30 @1469 int tz_id; 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1470 struct thermal_cooling_device *cdev; 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1471 struct thermal_zone_device *pos = NULL; 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1472 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1473 if (!tz) 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1474 return; 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1475 a5f785ce608caf drivers/thermal/thermal_core.c Dmitry Osipenko 2020-08-18 1476 tz_id = tz->id; 7e8ee1e9d7561f drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 1477 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1478 mutex_lock(&thermal_list_lock); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1479 list_for_each_entry(pos, &thermal_tz_list, node) 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1480 if (pos == tz) 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1481 break; 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1482 if (pos != tz) { 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1483 /* thermal zone device not found */ 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1484 mutex_unlock(&thermal_list_lock); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1485 return; 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1486 } b38aa87f67931e drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-08 1487 b38aa87f67931e drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-08 1488 mutex_lock(&tz->lock); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1489 list_del(&tz->node); b38aa87f67931e drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-08 1490 mutex_unlock(&tz->lock); 7e8ee1e9d7561f drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 1491 7e8ee1e9d7561f drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 1492 /* Unbind all cdevs associated with 'this' thermal zone */ ded2d383b1b441 drivers/thermal/thermal_core.c Zhang Rui 2023-03-30 1493 list_for_each_entry(cdev, &thermal_cdev_list, node) ded2d383b1b441 drivers/thermal/thermal_core.c Zhang Rui 2023-03-30 1494 if (tz->ops->unbind) 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1495 tz->ops->unbind(tz, cdev); 7e8ee1e9d7561f drivers/thermal/thermal_sys.c Durgadoss R 2012-09-18 1496 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1497 mutex_unlock(&thermal_list_lock); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1498 163b00cde7cf22 drivers/thermal/thermal_core.c Wei Wang 2019-11-12 1499 cancel_delayed_work_sync(&tz->poll_queue); b1569e99c795bf drivers/thermal/thermal_sys.c Matthew Garrett 2008-12-03 1500 e33df1d2f3a014 drivers/thermal/thermal_core.c Javi Merino 2015-02-26 1501 thermal_set_governor(tz, NULL); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1502 e68b16abd91dca drivers/thermal/thermal.c Zhang Rui 2008-04-21 1503 thermal_remove_hwmon_sysfs(tz); 5a5b7d8d541684 drivers/thermal/thermal_core.c keliu 2022-05-27 1504 ida_free(&thermal_tz_ida, tz->id); b31ef8285b19ec drivers/thermal/thermal_core.c Matthew Wilcox 2016-12-21 1505 ida_destroy(&tz->ida); 30b2ae07d3d60a drivers/thermal/thermal_core.c Guenter Roeck 2022-11-10 1506 30b2ae07d3d60a drivers/thermal/thermal_core.c Guenter Roeck 2022-11-10 1507 device_del(&tz->device); 30b2ae07d3d60a drivers/thermal/thermal_core.c Guenter Roeck 2022-11-10 1508 3d439b1a2ad36c drivers/thermal/thermal_core.c Daniel Lezcano 2023-04-04 1509 kfree(tz->tzp); 3d439b1a2ad36c drivers/thermal/thermal_core.c Daniel Lezcano 2023-04-04 1510 30b2ae07d3d60a drivers/thermal/thermal_core.c Guenter Roeck 2022-11-10 1511 put_device(&tz->device); 55cdf0a283b876 drivers/thermal/thermal_core.c Daniel Lezcano 2020-07-06 1512 f36483a0a8c34a drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-15 1513 thermal_notify_tz_delete(tz); 4649620d9404d3 drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-08 1514 4649620d9404d3 drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-08 1515 wait_for_completion(&tz->removal); 4649620d9404d3 drivers/thermal/thermal_core.c Rafael J. Wysocki 2023-12-08 1516 kfree(tz); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1517 } 910cb1e34d2fb8 drivers/thermal/thermal_core.c Eduardo Valentin 2013-04-23 1518 EXPORT_SYMBOL_GPL(thermal_zone_device_unregister); 203d3d4aa48233 drivers/thermal/thermal.c Zhang Rui 2008-01-17 1519 :::::: The code at line 1469 was first introduced by commit :::::: ded2d383b1b441f380552897791ffb85a1377f08 thermal/core: Remove thermal_bind_params structure :::::: TO: Zhang Rui <rui.zhang@xxxxxxxxx> :::::: CC: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki