[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209202046.mh0ChSOc-lkp@intel.com>
Date: Tue, 20 Sep 2022 20:41:52 +0800
From: kernel test robot <lkp@...el.com>
To: Yinbo Zhu <zhuyinbo@...ngson.cn>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Patchwork Bot <patchwork-bot@...nel.org>
Cc: kbuild-all@...ts.01.org, zhuyinbo@...ngson.cn,
zhanghongchen <zhanghongchen@...ngson.cn>
Subject: Re: [PATCH v2 3/3] thermal: loongson2: add thermal management support
Hi Yinbo,
I love your patch! Yet something to improve:
[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master v6.0-rc6 next-20220920]
[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/Yinbo-Zhu/MAINTAINERS-add-maintainer-for-thermal-driver-for-loongson2-SoCs/20220920-164910
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
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/397dbff22a869fded48efd17622b439a46ff6908
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yinbo-Zhu/MAINTAINERS-add-maintainer-for-thermal-driver-for-loongson2-SoCs/20220920-164910
git checkout 397dbff22a869fded48efd17622b439a46ff6908
# 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/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
>> drivers/thermal/loongson2_thermal.c:183:5: warning: no previous prototype for 'loongson2_thermal_remove' [-Wmissing-prototypes]
183 | int loongson2_thermal_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/thermal/loongson2_thermal.c:234:24: error: 'loongson2_thermal_pm_ops' undeclared here (not in a function); did you mean 'loongson2_thermal_probe'?
234 | .pm = &loongson2_thermal_pm_ops,
| ^~~~~~~~~~~~~~~~~~~~~~~~
| loongson2_thermal_probe
vim +234 drivers/thermal/loongson2_thermal.c
182
> 183 int loongson2_thermal_remove(struct platform_device *pdev)
184 {
185 struct loongson2_thermal_data *data = platform_get_drvdata(pdev);
186 int reg_off = data->id * 2;
187
188 /* disable interrupt */
189 writew(0, data->regs + LOONGSON2_TSENSOR_CTRL_LO + reg_off);
190 writew(0, data->regs + LOONGSON2_TSENSOR_CTRL_HI + reg_off);
191
192 return 0;
193 }
194
195 static const struct of_device_id of_loongson2_thermal_match[] = {
196 { .compatible = "loongson,loongson2-thermal",},
197 { /* end */ }
198 };
199 MODULE_DEVICE_TABLE(of, of_loongson2_thermal_match);
200
201 #ifdef CONFIG_PM_SLEEP
202 static int loongson2_thermal_suspend(struct device *dev)
203 {
204 struct loongson2_thermal_data *data = dev_get_drvdata(dev);
205 int reg_off = data->id * 2;
206
207 data->ctrl_low_val = readw(data->regs + LOONGSON2_TSENSOR_CTRL_LO + reg_off);
208 data->ctrl_hi_val = readw(data->regs + LOONGSON2_TSENSOR_CTRL_HI + reg_off);
209
210 writew(0, data->regs + LOONGSON2_TSENSOR_CTRL_LO + reg_off);
211 writew(0, data->regs + LOONGSON2_TSENSOR_CTRL_HI + reg_off);
212
213 return 0;
214 }
215
216 static int loongson2_thermal_resume(struct device *dev)
217 {
218 struct loongson2_thermal_data *data = dev_get_drvdata(dev);
219 int reg_off = data->id * 2;
220
221 writew(data->ctrl_low_val, data->regs + LOONGSON2_TSENSOR_CTRL_LO + reg_off);
222 writew(data->ctrl_hi_val, data->regs + LOONGSON2_TSENSOR_CTRL_HI + reg_off);
223
224 return 0;
225 }
226
227 static SIMPLE_DEV_PM_OPS(loongson2_thermal_pm_ops,
228 loongson2_thermal_suspend, loongson2_thermal_resume);
229 #endif
230
231 static struct platform_driver loongson2_thermal_driver = {
232 .driver = {
233 .name = "loongson2_thermal",
> 234 .pm = &loongson2_thermal_pm_ops,
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (241809 bytes)
Powered by blists - more mailing lists