lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208021537.9QX9GQ8R-lkp@intel.com>
Date:   Tue, 2 Aug 2022 16:06:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Daniel Lezcano <daniel.lezcano@...exp.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [thermal:thermal/linux-next 68/68]
 drivers/hwmon/pmbus/pmbus_core.c:1138:48: error: variable has incomplete
 type 'const struct thermal_zone_of_device_ops'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/linux-next
head:   340682c9ef87a4e56051c5b20cf2d5f99dec4ce1
commit: 340682c9ef87a4e56051c5b20cf2d5f99dec4ce1 [68/68] thermal/of: Remove old OF code
config: hexagon-randconfig-r005-20220801
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?id=340682c9ef87a4e56051c5b20cf2d5f99dec4ce1
        git remote add thermal git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git
        git fetch --no-tags thermal thermal/linux-next
        git checkout 340682c9ef87a4e56051c5b20cf2d5f99dec4ce1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/hwmon/pmbus/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/hwmon/pmbus/pmbus_core.c:1138:48: error: variable has incomplete type 'const struct thermal_zone_of_device_ops'
   static const struct thermal_zone_of_device_ops pmbus_thermal_ops = {
                                                  ^
   drivers/hwmon/pmbus/pmbus_core.c:1138:21: note: forward declaration of 'struct thermal_zone_of_device_ops'
   static const struct thermal_zone_of_device_ops pmbus_thermal_ops = {
                       ^
>> drivers/hwmon/pmbus/pmbus_core.c:1156:8: error: call to undeclared function 'devm_thermal_zone_of_sensor_register'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata,
                 ^
   drivers/hwmon/pmbus/pmbus_core.c:1156:8: note: did you mean 'devm_thermal_of_zone_register'?
   include/linux/thermal.h:325:29: note: 'devm_thermal_of_zone_register' declared here
   struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, int id, void *data,
                               ^
   2 errors generated.


vim +1138 drivers/hwmon/pmbus/pmbus_core.c

3aa74796cfd0383 Eduardo Valentin 2022-04-28  1137  
3aa74796cfd0383 Eduardo Valentin 2022-04-28 @1138  static const struct thermal_zone_of_device_ops pmbus_thermal_ops = {
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1139  	.get_temp = pmbus_thermal_get_temp,
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1140  };
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1141  
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1142  static int pmbus_thermal_add_sensor(struct pmbus_data *pmbus_data,
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1143  				    struct pmbus_sensor *sensor, int index)
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1144  {
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1145  	struct device *dev = pmbus_data->dev;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1146  	struct pmbus_thermal_data *tdata;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1147  	struct thermal_zone_device *tzd;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1148  
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1149  	tdata = devm_kzalloc(dev, sizeof(*tdata), GFP_KERNEL);
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1150  	if (!tdata)
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1151  		return -ENOMEM;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1152  
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1153  	tdata->sensor = sensor;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1154  	tdata->pmbus_data = pmbus_data;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1155  
3aa74796cfd0383 Eduardo Valentin 2022-04-28 @1156  	tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata,
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1157  						   &pmbus_thermal_ops);
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1158  	/*
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1159  	 * If CONFIG_THERMAL_OF is disabled, this returns -ENODEV,
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1160  	 * so ignore that error but forward any other error.
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1161  	 */
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1162  	if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV))
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1163  		return PTR_ERR(tzd);
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1164  
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1165  	return 0;
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1166  }
3aa74796cfd0383 Eduardo Valentin 2022-04-28  1167  

:::::: The code at line 1138 was first introduced by commit
:::::: 3aa74796cfd038310f68c7e67c804224e5b43809 hwmon: (pmbus) Register with thermal for PSC_TEMPERATURE

:::::: TO: Eduardo Valentin <eduval@...zon.com>
:::::: CC: Guenter Roeck <linux@...ck-us.net>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (107752 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ