[Intel-gfx] [drm-intel:topic/core-for-CI 2/20] kernel/locking/lockdep.c:2744:49: sparse: sparse: cast truncates bits from constant value (a0000 becomes 0)

kbuild test robot lkp at intel.com
Fri Apr 17 01:38:40 UTC 2020


tree:   git://anongit.freedesktop.org/drm-intel topic/core-for-CI
head:   d0435a9b45070b945578c093dcd363b6b73a502c
commit: cbc1ad45be43de36150fd98dae644fc89a69a5a0 [2/20] lockdep: Up MAX_LOCKDEP_CHAINS
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-191-gc51a0382-dirty
        git checkout cbc1ad45be43de36150fd98dae644fc89a69a5a0
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp at intel.com>


sparse warnings: (new ones prefixed by >>)

>> kernel/locking/lockdep.c:2744:49: sparse: sparse: cast truncates bits from constant value (a0000 becomes 0)
>> kernel/locking/lockdep.c:2744:49: sparse: sparse: cast truncates bits from constant value (a0000 becomes 0)

vim +2744 kernel/locking/lockdep.c

810507fe6fd5ff Waiman Long 2020-02-06  2736  
810507fe6fd5ff Waiman Long 2020-02-06  2737  static inline void init_chain_block(int offset, int next, int bucket, int size)
810507fe6fd5ff Waiman Long 2020-02-06  2738  {
810507fe6fd5ff Waiman Long 2020-02-06  2739  	chain_hlocks[offset] = (next >> 16) | CHAIN_BLK_FLAG;
810507fe6fd5ff Waiman Long 2020-02-06  2740  	chain_hlocks[offset + 1] = (u16)next;
810507fe6fd5ff Waiman Long 2020-02-06  2741  
810507fe6fd5ff Waiman Long 2020-02-06  2742  	if (size && !bucket) {
810507fe6fd5ff Waiman Long 2020-02-06  2743  		chain_hlocks[offset + 2] = size >> 16;
810507fe6fd5ff Waiman Long 2020-02-06 @2744  		chain_hlocks[offset + 3] = (u16)size;
810507fe6fd5ff Waiman Long 2020-02-06  2745  	}
810507fe6fd5ff Waiman Long 2020-02-06  2746  }
810507fe6fd5ff Waiman Long 2020-02-06  2747  

:::::: The code at line 2744 was first introduced by commit
:::::: 810507fe6fd5ff3de429121adff49523fabb643a locking/lockdep: Reuse freed chain_hlocks entries

:::::: TO: Waiman Long <longman at redhat.com>
:::::: CC: Ingo Molnar <mingo at kernel.org>

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


More information about the Intel-gfx mailing list