Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Ober <dober6023@gmail.com>, linux-hwmon@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, jdelvare@suse.com,
	linux@roeck-us.net, corbet@lwn.net, dober@lenovo.com,
	mpearson-lenovo@squebb.ca, David Ober <dober6023@gmail.com>
Subject: Re: [PATCH v2] hwmon:Add MEC172x Micro Chip driver for Lenovo motherboards
Date: Wed, 1 Nov 2023 18:56:14 +0800	[thread overview]
Message-ID: <202311011858.M1Ui9wp1-lkp@intel.com> (raw)
In-Reply-To: <20231031154930.4908-1-dober6023@gmail.com>

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311011858.M1Ui9wp1-lkp@intel.com/

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

  parent reply	other threads:[~2023-11-01 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 15:49 [PATCH v2] hwmon:Add MEC172x Micro Chip driver for Lenovo motherboards David Ober
2023-10-31 16:30 ` Guenter Roeck
2023-11-01 10:56 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-31 12:09 David Ober
2023-10-31 14:51 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202311011858.M1Ui9wp1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=corbet@lwn.net \
    --cc=dober6023@gmail.com \
    --cc=dober@lenovo.com \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox