Re: [PATCH v2] hwmon:Add MEC172x Micro Chip driver for Lenovo motherboards

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

 



Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v6.6 next-20231101]
[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/David-Ober/hwmon-Add-MEC172x-Micro-Chip-driver-for-Lenovo-motherboards/20231031-235345
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20231031154930.4908-1-dober6023%40gmail.com
patch subject: [PATCH v2] hwmon:Add MEC172x Micro Chip driver for Lenovo motherboards
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20231101/202311011858.M1Ui9wp1-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231101/202311011858.M1Ui9wp1-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311011858.M1Ui9wp1-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/hwmon/lenovo-ec-sensors.c: In function 'get_ec_reg':
   drivers/hwmon/lenovo-ec-sensors.c:36:25: error: implicit declaration of function 'inb_p'; did you mean 'int_pow'? [-Werror=implicit-function-declaration]
      36 | #define io_read8(a)     inb_p(a)
         |                         ^~~~~
   drivers/hwmon/lenovo-ec-sensors.c:45:13: note: in expansion of macro 'io_read8'
      45 |         if (io_read8(MCHP_EMI0_APPLICATION_ID) != 0) /* EMI access locked */
         |             ^~~~~~~~
   drivers/hwmon/lenovo-ec-sensors.c:35:25: error: implicit declaration of function 'outb_p' [-Werror=implicit-function-declaration]
      35 | #define io_write8(a, b) outb_p(b, a)
         |                         ^~~~~~
   drivers/hwmon/lenovo-ec-sensors.c:48:9: note: in expansion of macro 'io_write8'
      48 |         io_write8(MCHP_EMI0_APPLICATION_ID, 0x01);
         |         ^~~~~~~~~
   drivers/hwmon/lenovo-ec-sensors.c: In function 'get_platform':
>> drivers/hwmon/lenovo-ec-sensors.c:274:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     274 |         for (idx = 0 ; idx < 6 ; idx++)
         |         ^~~
   drivers/hwmon/lenovo-ec-sensors.c:276:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
     276 |                 system_type[idx] = get_ec_reg(0xC, (0x10 + idx));
         |                 ^~~~~~~~~~~
   In function 'get_platform',
       inlined from 'lenovo_ec_probe' at drivers/hwmon/lenovo-ec-sensors.c:420:26:
>> drivers/hwmon/lenovo-ec-sensors.c:276:34: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
     276 |                 system_type[idx] = get_ec_reg(0xC, (0x10 + idx));
         |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/hwmon/lenovo-ec-sensors.c: In function 'lenovo_ec_probe':
   drivers/hwmon/lenovo-ec-sensors.c:270:14: note: at offset 6 into destination object 'system_type' of size 6
     270 |         char system_type[6];
         |              ^~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/for +274 drivers/hwmon/lenovo-ec-sensors.c

   267	
   268	static int get_platform(struct ec_sensors_data *data)
   269	{
   270		char system_type[6];
   271		int ret = -1;
   272		int idx;
   273	
 > 274		for (idx = 0 ; idx < 6 ; idx++)
   275			mutex_lock(&data->mec_mutex);
 > 276			system_type[idx] = get_ec_reg(0xC, (0x10 + idx));
   277			mutex_unlock(&data->mec_mutex);
   278	
   279		for (idx = 0 ; idx < 4 ; idx++) {
   280			if (strcmp(systems[idx], system_type) == 0) {
   281				ret = idx;
   282				break;
   283			}
   284		}
   285		return ret;
   286	}
   287	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[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