[rafael-pm:bleeding-edge 158/161] drivers/thermal/thermal_sysfs.c:726:8: error: use of undeclared label 'unlock'

[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 bleeding-edge
head:   c7d553cb161f03e4424c88bddc26fadcbbf4b6d5
commit: db8666152df8b016530452714b0ad8c7f1b37f3c [158/161] thermal: core: Add and use cooling device guard
config: i386-buildonly-randconfig-005-20241013 (https://download.01.org/0day-ci/archive/20241013/202410132024.xuSMJC7v-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241013/202410132024.xuSMJC7v-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/202410132024.xuSMJC7v-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/thermal/thermal_sysfs.c:726:8: error: use of undeclared label 'unlock'
     726 |                 goto unlock;
         |                      ^
   1 error generated.


vim +/unlock +726 drivers/thermal/thermal_sysfs.c

8ea229511e06f9 Viresh Kumar      2018-04-02  702  
33e678d47d1f3e Viresh Kumar      2018-04-03  703  static ssize_t trans_table_show(struct device *dev,
33e678d47d1f3e Viresh Kumar      2018-04-03  704  				struct device_attribute *attr, char *buf)
8ea229511e06f9 Viresh Kumar      2018-04-02  705  {
8ea229511e06f9 Viresh Kumar      2018-04-02  706  	struct thermal_cooling_device *cdev = to_cooling_device(dev);
790930f44289c8 Rafael J. Wysocki 2023-03-17  707  	struct cooling_dev_stats *stats;
8ea229511e06f9 Viresh Kumar      2018-04-02  708  	ssize_t len = 0;
8ea229511e06f9 Viresh Kumar      2018-04-02  709  	int i, j;
8ea229511e06f9 Viresh Kumar      2018-04-02  710  
db8666152df8b0 Rafael J. Wysocki 2024-10-11  711  	guard(cooling_dev)(cdev);
790930f44289c8 Rafael J. Wysocki 2023-03-17  712  
790930f44289c8 Rafael J. Wysocki 2023-03-17  713  	stats = cdev->stats;
db8666152df8b0 Rafael J. Wysocki 2024-10-11  714  	if (!stats)
db8666152df8b0 Rafael J. Wysocki 2024-10-11  715  		return -ENODATA;
790930f44289c8 Rafael J. Wysocki 2023-03-17  716  
8ea229511e06f9 Viresh Kumar      2018-04-02  717  	len += snprintf(buf + len, PAGE_SIZE - len, " From  :    To\n");
8ea229511e06f9 Viresh Kumar      2018-04-02  718  	len += snprintf(buf + len, PAGE_SIZE - len, "       : ");
a365105c685cad Viresh Kumar      2022-10-17  719  	for (i = 0; i <= cdev->max_state; i++) {
8ea229511e06f9 Viresh Kumar      2018-04-02  720  		if (len >= PAGE_SIZE)
8ea229511e06f9 Viresh Kumar      2018-04-02  721  			break;
8ea229511e06f9 Viresh Kumar      2018-04-02  722  		len += snprintf(buf + len, PAGE_SIZE - len, "state%2u  ", i);
8ea229511e06f9 Viresh Kumar      2018-04-02  723  	}
790930f44289c8 Rafael J. Wysocki 2023-03-17  724  	if (len >= PAGE_SIZE) {
790930f44289c8 Rafael J. Wysocki 2023-03-17  725  		len = PAGE_SIZE;
790930f44289c8 Rafael J. Wysocki 2023-03-17 @726  		goto unlock;
790930f44289c8 Rafael J. Wysocki 2023-03-17  727  	}
8ea229511e06f9 Viresh Kumar      2018-04-02  728  
8ea229511e06f9 Viresh Kumar      2018-04-02  729  	len += snprintf(buf + len, PAGE_SIZE - len, "\n");
8ea229511e06f9 Viresh Kumar      2018-04-02  730  
a365105c685cad Viresh Kumar      2022-10-17  731  	for (i = 0; i <= cdev->max_state; i++) {
8ea229511e06f9 Viresh Kumar      2018-04-02  732  		if (len >= PAGE_SIZE)
8ea229511e06f9 Viresh Kumar      2018-04-02  733  			break;
8ea229511e06f9 Viresh Kumar      2018-04-02  734  
8ea229511e06f9 Viresh Kumar      2018-04-02  735  		len += snprintf(buf + len, PAGE_SIZE - len, "state%2u:", i);
8ea229511e06f9 Viresh Kumar      2018-04-02  736  
a365105c685cad Viresh Kumar      2022-10-17  737  		for (j = 0; j <= cdev->max_state; j++) {
8ea229511e06f9 Viresh Kumar      2018-04-02  738  			if (len >= PAGE_SIZE)
8ea229511e06f9 Viresh Kumar      2018-04-02  739  				break;
8ea229511e06f9 Viresh Kumar      2018-04-02  740  			len += snprintf(buf + len, PAGE_SIZE - len, "%8u ",
a365105c685cad Viresh Kumar      2022-10-17  741  				stats->trans_table[i * (cdev->max_state + 1) + j]);
8ea229511e06f9 Viresh Kumar      2018-04-02  742  		}
8ea229511e06f9 Viresh Kumar      2018-04-02  743  		if (len >= PAGE_SIZE)
8ea229511e06f9 Viresh Kumar      2018-04-02  744  			break;
8ea229511e06f9 Viresh Kumar      2018-04-02  745  		len += snprintf(buf + len, PAGE_SIZE - len, "\n");
8ea229511e06f9 Viresh Kumar      2018-04-02  746  	}
8ea229511e06f9 Viresh Kumar      2018-04-02  747  
8ea229511e06f9 Viresh Kumar      2018-04-02  748  	if (len >= PAGE_SIZE) {
8ea229511e06f9 Viresh Kumar      2018-04-02  749  		pr_warn_once("Thermal transition table exceeds PAGE_SIZE. Disabling\n");
790930f44289c8 Rafael J. Wysocki 2023-03-17  750  		len = -EFBIG;
8ea229511e06f9 Viresh Kumar      2018-04-02  751  	}
790930f44289c8 Rafael J. Wysocki 2023-03-17  752  
8ea229511e06f9 Viresh Kumar      2018-04-02  753  	return len;
8ea229511e06f9 Viresh Kumar      2018-04-02  754  }
8ea229511e06f9 Viresh Kumar      2018-04-02  755  

:::::: The code at line 726 was first introduced by commit
:::::: 790930f44289c8209c57461b2db499fcc702e0b3 thermal: core: Introduce thermal_cooling_device_update()

:::::: TO: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

-- 
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