From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [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]'
Date: Thu, 05 Aug 2021 20:17:21 +0800 [thread overview]
Message-ID: <202108052051.en9Bvr0J-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2021-08-05 12:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202108052051.en9Bvr0J-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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 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.