Hi Li-hao, I love your patch! Yet something to improve: [auto build test ERROR on rafael-pm/thermal] [also build test ERROR on krzk-dt/for-next linus/master v6.1-rc1 next-20221018] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Li-hao-Kuo/Add-thermal-control-driver-for-Sunplus-SoC/20221018-153345 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal patch link: https://lore.kernel.org/r/076585e120b64832dcb81e39f3e59d719148816b.1665990345.git.lhjeff911%40gmail.com patch subject: [PATCH v11 1/2] thermal: Add thermal driver for Sunplus config: sh-allmodconfig compiler: sh4-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/16210cee570585582144ab4a8ca2c219aef17189 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Li-hao-Kuo/Add-thermal-control-driver-for-Sunplus-SoC/20221018-153345 git checkout 16210cee570585582144ab4a8ca2c219aef17189 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/thermal/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): >> drivers/thermal/sunplus_thermal.c:74:21: error: variable 'sp_of_thermal_ops' has initializer but incomplete type 74 | static const struct thermal_zone_of_device_ops sp_of_thermal_ops = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/thermal/sunplus_thermal.c:75:10: error: 'const struct thermal_zone_of_device_ops' has no member named 'get_temp' 75 | .get_temp = sp_thermal_get_sensor_temp, | ^~~~~~~~ >> drivers/thermal/sunplus_thermal.c:75:21: warning: excess elements in struct initializer 75 | .get_temp = sp_thermal_get_sensor_temp, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/thermal/sunplus_thermal.c:75:21: note: (near initialization for 'sp_of_thermal_ops') drivers/thermal/sunplus_thermal.c: In function 'sunplus_thermal_probe': >> drivers/thermal/sunplus_thermal.c:100:27: error: implicit declaration of function 'devm_thermal_zone_of_sensor_register'; did you mean 'devm_thermal_of_zone_register'? [-Werror=implicit-function-declaration] 100 | sp_data->pcb_tz = devm_thermal_zone_of_sensor_register(&pdev->dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | devm_thermal_of_zone_register >> drivers/thermal/sunplus_thermal.c:100:25: warning: assignment to 'struct thermal_zone_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 100 | sp_data->pcb_tz = devm_thermal_zone_of_sensor_register(&pdev->dev, | ^ drivers/thermal/sunplus_thermal.c: At top level: >> drivers/thermal/sunplus_thermal.c:74:48: error: storage size of 'sp_of_thermal_ops' isn't known 74 | static const struct thermal_zone_of_device_ops sp_of_thermal_ops = { | ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/sp_of_thermal_ops +74 drivers/thermal/sunplus_thermal.c 73 > 74 static const struct thermal_zone_of_device_ops sp_of_thermal_ops = { > 75 .get_temp = sp_thermal_get_sensor_temp, 76 }; 77 78 static int sunplus_thermal_probe(struct platform_device *pdev) 79 { 80 struct sp_thermal_data *sp_data; 81 int ret; 82 83 sp_data = devm_kzalloc(&pdev->dev, sizeof(*sp_data), GFP_KERNEL); 84 if (!sp_data) 85 return -ENOMEM; 86 87 sp_data->regs = devm_platform_ioremap_resource(pdev, 0); 88 if (IS_ERR(sp_data->regs)) { 89 dev_err(&pdev->dev, "resource get fail\n"); 90 return PTR_ERR(sp_data->regs); 91 } 92 93 writel(ENABLE_THERMAL, sp_data->regs + SP_THERMAL_CTL0_REG); 94 95 platform_set_drvdata(pdev, sp_data); 96 ret = sunplus_get_otp_temp_coef(sp_data, &pdev->dev); 97 if (ret) 98 return ret; 99 > 100 sp_data->pcb_tz = devm_thermal_zone_of_sensor_register(&pdev->dev, 101 0, 102 sp_data, &sp_of_thermal_ops); 103 104 if (IS_ERR(sp_data->pcb_tz)) { 105 ret = PTR_ERR(sp_data->pcb_tz); 106 dev_err(&pdev->dev, "failed to register tsensor: %d\n", ret); 107 return ret; 108 } 109 110 return ret; 111 } 112 -- 0-DAY CI Kernel Test Service https://01.org/lkp