[rafael-pm:thermal-core-testing 2/28] drivers/thermal/hisi_thermal.c:484:29: warning: unused variable 'trip'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal-core-testing
head:   c213ec5d265075e670b175f577fc30f12c2bf093
commit: 09a7303648169c6d8c5f2608b0764a7095a15c21 [2/28] thermal: hisi: Use thermal_zone_for_each_trip() in hisi_thermal_register_sensor()
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20240801/202408010134.hozVfGEo-lkp@xxxxxxxxx/config)
compiler: xtensa-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240801/202408010134.hozVfGEo-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/202408010134.hozVfGEo-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/thermal/hisi_thermal.c: In function 'hisi_thermal_register_sensor':
>> drivers/thermal/hisi_thermal.c:484:29: warning: unused variable 'trip' [-Wunused-variable]
     484 |         struct thermal_trip trip;
         |                             ^~~~
>> drivers/thermal/hisi_thermal.c:483:18: warning: unused variable 'i' [-Wunused-variable]
     483 |         int ret, i;
         |                  ^


vim +/trip +484 drivers/thermal/hisi_thermal.c

09a7303648169c Rafael J. Wysocki 2024-07-29  479  
9a5238a9c6c33d kongxinwei        2015-05-20  480  static int hisi_thermal_register_sensor(struct platform_device *pdev,
a160a465297362 Kevin Wangtao     2017-10-22  481  					struct hisi_thermal_sensor *sensor)
9a5238a9c6c33d kongxinwei        2015-05-20  482  {
9a5238a9c6c33d kongxinwei        2015-05-20 @483  	int ret, i;
68a306cc839718 Daniel Lezcano    2022-10-03 @484  	struct thermal_trip trip;
9a5238a9c6c33d kongxinwei        2015-05-20  485  
5ee7811e9afa4f Daniel Lezcano    2022-08-05  486  	sensor->tzd = devm_thermal_of_zone_register(&pdev->dev,
49e778d1c750d5 Daniel Lezcano    2018-09-25  487  						    sensor->id, sensor,
81d7cb7946f03d Daniel Lezcano    2017-10-19  488  						    &hisi_of_thermal_ops);
9a5238a9c6c33d kongxinwei        2015-05-20  489  	if (IS_ERR(sensor->tzd)) {
9a5238a9c6c33d kongxinwei        2015-05-20  490  		ret = PTR_ERR(sensor->tzd);
439dc96811739a Leo Yan           2016-03-29  491  		sensor->tzd = NULL;
9a5238a9c6c33d kongxinwei        2015-05-20  492  		dev_err(&pdev->dev, "failed to register sensor id %d: %d\n",
9a5238a9c6c33d kongxinwei        2015-05-20  493  			sensor->id, ret);
9a5238a9c6c33d kongxinwei        2015-05-20  494  		return ret;
9a5238a9c6c33d kongxinwei        2015-05-20  495  	}
9a5238a9c6c33d kongxinwei        2015-05-20  496  
09a7303648169c Rafael J. Wysocki 2024-07-29  497  	thermal_zone_for_each_trip(sensor->tzd, hisi_trip_walk_cb, sensor);
9a5238a9c6c33d kongxinwei        2015-05-20  498  
9a5238a9c6c33d kongxinwei        2015-05-20  499  	return 0;
9a5238a9c6c33d kongxinwei        2015-05-20  500  }
9a5238a9c6c33d kongxinwei        2015-05-20  501  

:::::: The code at line 484 was first introduced by commit
:::::: 68a306cc839718d1875b46ebf73c25c8fa7f704a thermal/drivers/hisi: Use generic thermal_zone_get_trip() function

:::::: TO: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
:::::: CC: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux