mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [allisonhenderson-xfs-work:pptrs_restart129 31/37] include/linux/mman.h:158:9: warning: division by zero is undefined
@ 2021-11-07 17:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-07 17:03 UTC (permalink / raw)
  To: Allison Collins; +Cc: llvm, kbuild-all, linux-kernel

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

tree:   https://github.com/allisonhenderson/xfs_work.git pptrs_restart129
head:   f0a0e96bd7e03c467041931dc1b9663111f1d365
commit: 72e3522333e0467ce3829aa51dcaaaa8e828b3ab [31/37] xfs: Add helper function xfs_attr_list_context_init
config: mips-buildonly-randconfig-r004-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/allisonhenderson/xfs_work/commit/72e3522333e0467ce3829aa51dcaaaa8e828b3ab
        git remote add allisonhenderson-xfs-work https://github.com/allisonhenderson/xfs_work.git
        git fetch --no-tags allisonhenderson-xfs-work pptrs_restart129
        git checkout 72e3522333e0467ce3829aa51dcaaaa8e828b3ab
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips 

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 fs/xfs/xfs_file.c:20:
   fs/xfs/libxfs/xfs_attr.h:33:21: error: no member named 'larp' in 'struct xfs_globals'
           return xfs_globals.larp;
                  ~~~~~~~~~~~ ^
   In file included from fs/xfs/xfs_file.c:31:
>> include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
                  _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:134:48: note: expanded from macro '_calc_vm_trans'
     ((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \
                                                  ^ ~~~~~~
>> include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
                  _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:135:21: note: expanded from macro '_calc_vm_trans'
      : ((x) & (bit1)) / ((bit1) / (bit2))))
                       ^ ~~~~~~~~~~~~~~~~~
   2 warnings and 1 error generated.


vim +158 include/linux/mman.h

^1da177e4c3f41 Linus Torvalds  2005-04-16  148  
^1da177e4c3f41 Linus Torvalds  2005-04-16  149  /*
^1da177e4c3f41 Linus Torvalds  2005-04-16  150   * Combine the mmap "flags" argument into "vm_flags" used internally.
^1da177e4c3f41 Linus Torvalds  2005-04-16  151   */
^1da177e4c3f41 Linus Torvalds  2005-04-16  152  static inline unsigned long
^1da177e4c3f41 Linus Torvalds  2005-04-16  153  calc_vm_flag_bits(unsigned long flags)
^1da177e4c3f41 Linus Torvalds  2005-04-16  154  {
^1da177e4c3f41 Linus Torvalds  2005-04-16  155  	return _calc_vm_trans(flags, MAP_GROWSDOWN,  VM_GROWSDOWN ) |
^1da177e4c3f41 Linus Torvalds  2005-04-16  156  	       _calc_vm_trans(flags, MAP_DENYWRITE,  VM_DENYWRITE ) |
b6fb293f2497a9 Jan Kara        2017-11-01  157  	       _calc_vm_trans(flags, MAP_LOCKED,     VM_LOCKED    ) |
b3fbbea4c00220 Kevin Brodsky   2019-11-25 @158  	       _calc_vm_trans(flags, MAP_SYNC,	     VM_SYNC      ) |
b3fbbea4c00220 Kevin Brodsky   2019-11-25  159  	       arch_calc_vm_flag_bits(flags);
^1da177e4c3f41 Linus Torvalds  2005-04-16  160  }
00619bcc44d6b7 Jerome Marchand 2013-11-12  161  

:::::: The code at line 158 was first introduced by commit
:::::: b3fbbea4c00220f62e6f7e2514466e6ee81f7f60 mm: Introduce arch_calc_vm_flag_bits()

:::::: TO: Kevin Brodsky <Kevin.Brodsky@arm.com>
:::::: CC: Catalin Marinas <catalin.marinas@arm.com>

---
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: 35443 bytes --]

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

only message in thread, other threads:[~2021-11-07 17:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-07 17:03 [allisonhenderson-xfs-work:pptrs_restart129 31/37] include/linux/mman.h:158:9: warning: division by zero is undefined 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

all inboxes | Powered by JetHome®