From: kernel test robot <lkp@intel.com>
To: Johannes Berg <johannes.berg@intel.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [linux-next:master 12285/12841] include/linux/kernel.h:44:25: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1'
Date: Sat, 30 Oct 2021 17:04:21 +0800 [thread overview]
Message-ID: <202110301703.1Alvd2t6-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2830 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: bdcc9f6a568275aed4cc32fd2312432d2ff1b704
commit: 3f7320428fa41a4c8be9c6f3d0cc06beeb0b3df8 [12285/12841] iwlwifi: pcie: simplify iwl_pci_find_dev_info()
config: alpha-randconfig-r004-20211028 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.0
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3f7320428fa41a4c8be9c6f3d0cc06beeb0b3df8
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 3f7320428fa41a4c8be9c6f3d0cc06beeb0b3df8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/net/wireless/intel/iwlwifi/pcie/drv.c:9:
drivers/net/wireless/intel/iwlwifi/pcie/drv.c: In function 'iwl_pci_find_dev_info':
>> include/linux/kernel.h:44:25: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Woverflow]
44 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1344:18: note: in expansion of macro 'ARRAY_SIZE'
1344 | for (i = ARRAY_SIZE(iwl_dev_info_table) - 1; i >= 0; i--) {
| ^~~~~~~~~~
vim +44 include/linux/kernel.h
d38499530e5f17 Christoph Hellwig 2016-11-01 39
e8c97af0c1f23d Randy Dunlap 2017-10-13 40 /**
e8c97af0c1f23d Randy Dunlap 2017-10-13 41 * ARRAY_SIZE - get the number of elements in array @arr
e8c97af0c1f23d Randy Dunlap 2017-10-13 42 * @arr: array to be sized
e8c97af0c1f23d Randy Dunlap 2017-10-13 43 */
c5e631cf65f4d6 Rusty Russell 2007-05-06 @44 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
c5e631cf65f4d6 Rusty Russell 2007-05-06 45
:::::: The code at line 44 was first introduced by commit
:::::: c5e631cf65f4d6875efcd571275436f2964a8b48 ARRAY_SIZE: check for type
:::::: TO: Rusty Russell <rusty@rustcorp.com.au>
:::::: CC: Linus Torvalds <torvalds@woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36580 bytes --]
reply other threads:[~2021-10-30 9:05 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=202110301703.1Alvd2t6-lkp@intel.com \
--to=lkp@intel.com \
--cc=johannes.berg@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=luciano.coelho@intel.com \
/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