linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [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'
@ 2021-10-30  9:04 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-30  9:04 UTC (permalink / raw)
  To: Johannes Berg; +Cc: kbuild-all, Linux Memory Management List, Luca Coelho

[-- 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 --]

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

only message in thread, other threads:[~2021-10-30  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30  9:04 [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' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).