[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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux