All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-linux-intel-lts:5.4/yocto 15/1142] include/linux/bits.h:8:26: warning: left shift count >= width of type
@ 2021-03-05  5:38 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-05  5:38 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/intel/linux-intel-lts.git 5.4/yocto
head:   eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 9b07a958f2eb496c88faf0bd749eb600357f4190 [15/1142] crypto: keembay: Add Keem Bay OCS HCU
config: m68k-randconfig-r036-20210305 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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://github.com/intel/linux-intel-lts/commit/9b07a958f2eb496c88faf0bd749eb600357f4190
        git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-linux-intel-lts 5.4/yocto
        git checkout 9b07a958f2eb496c88faf0bd749eb600357f4190
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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/kernel.h:11,
                    from include/linux/delay.h:22,
                    from drivers/crypto/keembay/keembay-ocs-hcu-core.c:8:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/cpumask.h:13,
                    from include/linux/interrupt.h:8,
                    from drivers/crypto/keembay/keembay-ocs-hcu-core.c:9:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/asm-generic/bug.h:182:25: note: in definition of macro 'WARN_ON'
     182 |  int __ret_warn_on = !!(condition);    \
         |                         ^~~~~~~~~
   include/linux/dma-mapping.h:355:6: note: in expansion of macro 'WARN_ON_ONCE'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |      ^~~~~~~~~~~~
   arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
     170 | #define pfn_valid(pfn)  virt_addr_valid(pfn_to_virt(pfn))
         |                         ^~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   In file included from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/linux/delay.h:22,
                    from drivers/crypto/keembay/keembay-ocs-hcu-core.c:8:
   drivers/crypto/keembay/keembay-ocs-hcu-core.c: In function 'kmb_ocs_add_dma_tail':
>> include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
       8 | #define BIT(nr)   (UL(1) << (nr))
         |                          ^~
   drivers/crypto/keembay/ocs-hcu.h:30:36: note: in expansion of macro 'BIT'
      30 | #define OCS_HCU_DMA_MAX_ADDR_MASK (BIT(32) - 1)
         |                                    ^~~
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:46: note: in expansion of macro 'OCS_HCU_DMA_MAX_ADDR_MASK'
     226 |  if (addr & KMB_OCS_HCU_ALIGN_MASK || addr > OCS_HCU_DMA_MAX_ADDR_MASK)
         |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/linux/delay.h:22,
                    from drivers/crypto/keembay/ocs-hcu.c:8:
   drivers/crypto/keembay/ocs-hcu.c: In function 'ocs_hcu_ll_dma_start':
>> include/linux/bits.h:8:26: warning: left shift count >= width of type [-Wshift-count-overflow]
       8 | #define BIT(nr)   (UL(1) << (nr))
         |                          ^~
   drivers/crypto/keembay/ocs-hcu.h:30:36: note: in expansion of macro 'BIT'
      30 | #define OCS_HCU_DMA_MAX_ADDR_MASK (BIT(32) - 1)
         |                                    ^~~
   drivers/crypto/keembay/ocs-hcu.c:389:22: note: in expansion of macro 'OCS_HCU_DMA_MAX_ADDR_MASK'
     389 |  if (!head || head > OCS_HCU_DMA_MAX_ADDR_MASK)
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +8 include/linux/bits.h

8bd9cb51daac8933 Will Deacon     2018-06-19   7  
95b980d62d52c4c1 Masahiro Yamada 2019-07-16  @8  #define BIT(nr)			(UL(1) << (nr))
95b980d62d52c4c1 Masahiro Yamada 2019-07-16   9  #define BIT_ULL(nr)		(ULL(1) << (nr))
95b980d62d52c4c1 Masahiro Yamada 2019-07-16  10  #define BIT_MASK(nr)		(UL(1) << ((nr) % BITS_PER_LONG))
8bd9cb51daac8933 Will Deacon     2018-06-19  11  #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
95b980d62d52c4c1 Masahiro Yamada 2019-07-16  12  #define BIT_ULL_MASK(nr)	(ULL(1) << ((nr) % BITS_PER_LONG_LONG))
8bd9cb51daac8933 Will Deacon     2018-06-19  13  #define BIT_ULL_WORD(nr)	((nr) / BITS_PER_LONG_LONG)
8bd9cb51daac8933 Will Deacon     2018-06-19  14  #define BITS_PER_BYTE		8
8bd9cb51daac8933 Will Deacon     2018-06-19  15  

:::::: The code@line 8 was first introduced by commit
:::::: 95b980d62d52c4c1768ee719e8db3efe27ef52b2 linux/bits.h: make BIT(), GENMASK(), and friends available in assembly

:::::: TO: Masahiro Yamada <yamada.masahiro@socionext.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.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: 19643 bytes --]

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

only message in thread, other threads:[~2021-03-05  5:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  5:38 [intel-linux-intel-lts:5.4/yocto 15/1142] include/linux/bits.h:8:26: warning: left shift count >= width of type kernel test robot

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.