All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 123/5318] drivers/hwmon/pc87427.c:308 pc87427_readall_temp() warn: '((_inw(iobase + 20)))' 65535 can't fit into 32767 'data->temp[nr]'
@ 2021-08-05 12:17 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-05 12:17 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Niklas Schnelle <schnelle@linux.ibm.com>
CC: Arnd Bergmann <arnd@arndb.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2f73937c9aa561e2082839bc1a8efaac75d6e244
commit: 5ae6eadfdaf431f47adbdf1754f3b5a5fd638de2 [123/5318] asm-generic/io.h: warn in inb() and friends with undefined PCI_IOBASE
:::::: branch date: 19 hours ago
:::::: commit date: 3 months ago
config: nios2-randconfig-m031-20210804 (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.3.0

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

smatch warnings:
drivers/hwmon/pc87427.c:308 pc87427_readall_temp() warn: '((_inw(iobase + 20)))' 65535 can't fit into 32767 'data->temp[nr]'

vim +308 drivers/hwmon/pc87427.c

008e5f3350e0a4 Jean Delvare  2010-08-14  296  
36564efaddb7c1 Guenter Roeck 2012-01-19  297  /*
36564efaddb7c1 Guenter Roeck 2012-01-19  298   * Dedicated function to read all registers related to a given temperature
36564efaddb7c1 Guenter Roeck 2012-01-19  299   * input. This saves us quite a few locks and bank selections.
36564efaddb7c1 Guenter Roeck 2012-01-19  300   * Must be called with data->lock held.
36564efaddb7c1 Guenter Roeck 2012-01-19  301   * nr is from 0 to 5
36564efaddb7c1 Guenter Roeck 2012-01-19  302   */
008e5f3350e0a4 Jean Delvare  2010-08-14  303  static void pc87427_readall_temp(struct pc87427_data *data, u8 nr)
008e5f3350e0a4 Jean Delvare  2010-08-14  304  {
008e5f3350e0a4 Jean Delvare  2010-08-14  305  	int iobase = data->address[LD_TEMP];
008e5f3350e0a4 Jean Delvare  2010-08-14  306  
008e5f3350e0a4 Jean Delvare  2010-08-14  307  	outb(BANK_TM(nr), iobase + PC87427_REG_BANK);
008e5f3350e0a4 Jean Delvare  2010-08-14 @308  	data->temp[nr] = le16_to_cpu(inw(iobase + PC87427_REG_TEMP));
008e5f3350e0a4 Jean Delvare  2010-08-14  309  	data->temp_max[nr] = inb(iobase + PC87427_REG_TEMP_MAX);
008e5f3350e0a4 Jean Delvare  2010-08-14  310  	data->temp_min[nr] = inb(iobase + PC87427_REG_TEMP_MIN);
008e5f3350e0a4 Jean Delvare  2010-08-14  311  	data->temp_crit[nr] = inb(iobase + PC87427_REG_TEMP_CRIT);
008e5f3350e0a4 Jean Delvare  2010-08-14  312  	data->temp_type[nr] = inb(iobase + PC87427_REG_TEMP_TYPE);
008e5f3350e0a4 Jean Delvare  2010-08-14  313  	data->temp_status[nr] = inb(iobase + PC87427_REG_TEMP_STATUS);
008e5f3350e0a4 Jean Delvare  2010-08-14  314  	/* Clear fan alarm bits */
008e5f3350e0a4 Jean Delvare  2010-08-14  315  	outb(data->temp_status[nr], iobase + PC87427_REG_TEMP_STATUS);
008e5f3350e0a4 Jean Delvare  2010-08-14  316  }
008e5f3350e0a4 Jean Delvare  2010-08-14  317  

:::::: The code at line 308 was first introduced by commit
:::::: 008e5f3350e0a474baff3ed3eb4f79653a6b6745 hwmon: (pc87427) Add temperature monitoring support

:::::: TO: Jean Delvare <khali@linux-fr.org>
:::::: CC: Jean Delvare <khali@linux-fr.org>

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05 12:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 12:17 [linux-next:master 123/5318] drivers/hwmon/pc87427.c:308 pc87427_readall_temp() warn: '((_inw(iobase + 20)))' 65535 can't fit into 32767 'data->temp[nr]' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.