Re: [PATCH] thermal/core: Make cooling device state change private

From: kernel test robot
Date: Mon Jan 11 2021 - 11:21:34 EST


Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on linus/master v5.11-rc3 next-20210111]
[cannot apply to thermal/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Daniel-Lezcano/thermal-core-Make-cooling-device-state-change-private/20210111-221657
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: openrisc-randconfig-r002-20210111 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
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://github.com/0day-ci/linux/commit/7e1231d27217f86cbadf3800d61cbe74a29f913d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Lezcano/thermal-core-Make-cooling-device-state-change-private/20210111-221657
git checkout 7e1231d27217f86cbadf3800d61cbe74a29f913d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/thermal/khadas_mcu_fan.c: In function 'khadas_mcu_fan_probe':
>> drivers/thermal/khadas_mcu_fan.c:103:2: error: implicit declaration of function 'thermal_cdev_update'; did you mean 'thermal_zone_device_update'? [-Werror=implicit-function-declaration]
103 | thermal_cdev_update(cdev);
| ^~~~~~~~~~~~~~~~~~~
| thermal_zone_device_update
cc1: some warnings being treated as errors


vim +103 drivers/thermal/khadas_mcu_fan.c

5772717e59b9fbdc Neil Armstrong 2020-06-24 78
5772717e59b9fbdc Neil Armstrong 2020-06-24 79 static int khadas_mcu_fan_probe(struct platform_device *pdev)
5772717e59b9fbdc Neil Armstrong 2020-06-24 80 {
5772717e59b9fbdc Neil Armstrong 2020-06-24 81 struct khadas_mcu *mcu = dev_get_drvdata(pdev->dev.parent);
5772717e59b9fbdc Neil Armstrong 2020-06-24 82 struct thermal_cooling_device *cdev;
5772717e59b9fbdc Neil Armstrong 2020-06-24 83 struct device *dev = &pdev->dev;
5772717e59b9fbdc Neil Armstrong 2020-06-24 84 struct khadas_mcu_fan_ctx *ctx;
5772717e59b9fbdc Neil Armstrong 2020-06-24 85 int ret;
5772717e59b9fbdc Neil Armstrong 2020-06-24 86
5772717e59b9fbdc Neil Armstrong 2020-06-24 87 ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
5772717e59b9fbdc Neil Armstrong 2020-06-24 88 if (!ctx)
5772717e59b9fbdc Neil Armstrong 2020-06-24 89 return -ENOMEM;
5772717e59b9fbdc Neil Armstrong 2020-06-24 90 ctx->mcu = mcu;
5772717e59b9fbdc Neil Armstrong 2020-06-24 91 platform_set_drvdata(pdev, ctx);
5772717e59b9fbdc Neil Armstrong 2020-06-24 92
5772717e59b9fbdc Neil Armstrong 2020-06-24 93 cdev = devm_thermal_of_cooling_device_register(dev->parent,
5772717e59b9fbdc Neil Armstrong 2020-06-24 94 dev->parent->of_node, "khadas-mcu-fan", ctx,
5772717e59b9fbdc Neil Armstrong 2020-06-24 95 &khadas_mcu_fan_cooling_ops);
5772717e59b9fbdc Neil Armstrong 2020-06-24 96 if (IS_ERR(cdev)) {
5772717e59b9fbdc Neil Armstrong 2020-06-24 97 ret = PTR_ERR(cdev);
5772717e59b9fbdc Neil Armstrong 2020-06-24 98 dev_err(dev, "Failed to register khadas-mcu-fan as cooling device: %d\n",
5772717e59b9fbdc Neil Armstrong 2020-06-24 99 ret);
5772717e59b9fbdc Neil Armstrong 2020-06-24 100 return ret;
5772717e59b9fbdc Neil Armstrong 2020-06-24 101 }
5772717e59b9fbdc Neil Armstrong 2020-06-24 102 ctx->cdev = cdev;
5772717e59b9fbdc Neil Armstrong 2020-06-24 @103 thermal_cdev_update(cdev);
5772717e59b9fbdc Neil Armstrong 2020-06-24 104
5772717e59b9fbdc Neil Armstrong 2020-06-24 105 return 0;
5772717e59b9fbdc Neil Armstrong 2020-06-24 106 }
5772717e59b9fbdc Neil Armstrong 2020-06-24 107

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip