Re: [PATCH v4 2/2] hwmon: (asus_wmi_sensors) Support X370 Asus WMI.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Denis,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 39b483aa38995329326988cbc4077422bebc175a]

url:    https://github.com/0day-ci/linux/commits/Denis-Pauk/Update-ASUS-WMI-supported-boards/20211011-050740
base:   39b483aa38995329326988cbc4077422bebc175a
config: i386-randconfig-r035-20211011 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 903b30fea21f99d8f48fde4defcc838970e30ee1)
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/134088f1e04948512edbb1c28c6031b0b9115403
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Denis-Pauk/Update-ASUS-WMI-supported-boards/20211011-050740
        git checkout 134088f1e04948512edbb1c28c6031b0b9115403
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

>> drivers/hwmon/asus_wmi_sensors.c:439:24: warning: address of array 'sensor->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
           if (sensor && sensor->name)
                      ~~ ~~~~~~~~^~~~
   1 warning generated.


vim +439 drivers/hwmon/asus_wmi_sensors.c

   430	
   431	static umode_t asus_wmi_hwmon_is_visible(const void *drvdata,
   432						 enum hwmon_sensor_types type, u32 attr,
   433						 int channel)
   434	{
   435		const struct asus_wmi_sensor_info *sensor;
   436		const struct asus_wmi_sensors *sensor_data = drvdata;
   437	
   438		sensor = *(sensor_data->wmi.info[type] + channel);
 > 439		if (sensor && sensor->name)
   440			return 0444;
   441	
   442		return 0;
   443	}
   444	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux