Re: [PATCH v2 3/7] drivers: hwmon: Add the iEi WT61P803 PUZZLE HWMON driver

kernel test robot
2020-09-26T22:57:13Z

[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]

Hi Luka,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on lee-mfd/for-mfd-next pavel-linux-leds/for-next linus/master v5.9-rc6 next-20200925]
[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/Luka-Kovacic/Add-support-for-the-iEi-Puzzle-M801-board/20200926-215756
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/a453994a7710920ee06d179274597737ff37af27
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luka-Kovacic/Add-support-for-the-iEi-Puzzle-M801-board/20200926-215756
git checkout a453994a7710920ee06d179274597737ff37af27
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2

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

All warnings (new ones prefixed by >>):

drivers/hwmon/iei-wt61p803-puzzle-hwmon.c: In function 'iei_wt61p803_puzzle_hwmon_probe':
>> drivers/hwmon/iei-wt61p803-puzzle-hwmon.c:457:17: warning: variable 'hwmon_dev' set but not used [-Wunused-but-set-variable]
457 | struct device *hwmon_dev;
| ^~~~~~~~~

vim +/hwmon_dev +457 drivers/hwmon/iei-wt61p803-puzzle-hwmon.c

450
451 static int iei_wt61p803_puzzle_hwmon_probe(struct platform_device *pdev)
452 {
453 struct device *dev = &pdev->dev;
454 struct fwnode_handle *child;
455 struct iei_wt61p803_puzzle_hwmon *mcu_hwmon;
456 struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent);
> 457 struct device *hwmon_dev;
458 int ret;
459
460 mcu_hwmon = devm_kzalloc(dev, sizeof(*mcu_hwmon), GFP_KERNEL);
461 if (!mcu_hwmon)
462 return -ENOMEM;
463
464 mcu_hwmon->response_buffer = devm_kzalloc(dev,
465 IEI_WT61P803_PUZZLE_BUF_SIZE, GFP_KERNEL);
466 if (!mcu_hwmon->response_buffer)
467 return -ENOMEM;
468
469 mcu_hwmon->mcu = mcu;
470 mutex_init(&mcu_hwmon->lock);
471 platform_set_drvdata(pdev, mcu_hwmon);
472
473 hwmon_dev = devm_hwmon_device_register_with_info(dev,
474 "iei_wt61p803_puzzle",
475 mcu_hwmon,
476 &iei_wt61p803_puzzle_chip_info,
477 NULL);
478
479 /* Control fans via PWM lines via Linux Kernel */
480 if (IS_ENABLED(CONFIG_THERMAL)) {
481 device_for_each_child_node(dev, child) {
482 ret = iei_wt61p803_puzzle_enable_thermal_cooling_dev(dev, child, mcu_hwmon);
483 if (ret) {
484 dev_err(dev, "Enabling the PWM fan failed\n");
485 fwnode_handle_put(child);
486 return ret;
487 }
488 }
489 }
490 return 0;
491 }
492

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 57189 bytes --]