[viro-vfs:headers.unaligned 2/2] include/linux/unaligned.h:119:16: sparse: sparse: cast truncates bits from constant value (aa01a0 becomes a0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Al,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git headers.unaligned
head:   959598f725aa7721a4bad53c2e997c7255ff32dc
commit: 959598f725aa7721a4bad53c2e997c7255ff32dc [2/2] move asm/unaligned.h to linux/unaligned.h
config: x86_64-randconfig-123-20231214 (https://download.01.org/0day-ci/archive/20231214/202312140955.cqLj4SLn-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312140955.cqLj4SLn-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312140955.cqLj4SLn-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   drivers/input/touchscreen/hynitron_cstxxx.c: note: in included file:
>> include/linux/unaligned.h:119:16: sparse: sparse: cast truncates bits from constant value (aa01a0 becomes a0)
>> include/linux/unaligned.h:120:20: sparse: sparse: cast truncates bits from constant value (aa01 becomes 1)
>> include/linux/unaligned.h:119:16: sparse: sparse: cast truncates bits from constant value (ab00d0 becomes d0)
>> include/linux/unaligned.h:120:20: sparse: sparse: cast truncates bits from constant value (ab00 becomes 0)

vim +119 include/linux/unaligned.h

803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08  116  
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08  117  static inline void __put_unaligned_le24(const u32 val, u8 *p)
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08  118  {
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08 @119  	*p++ = val;
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08 @120  	*p++ = val >> 8;
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08  121  	*p++ = val >> 16;
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08  122  }
803f4e1eab7a89 include/asm-generic/unaligned.h Arnd Bergmann 2021-05-08  123  

:::::: The code at line 119 was first introduced by commit
:::::: 803f4e1eab7a8938ba3a3c30dd4eb5e9eeef5e63 asm-generic: simplify asm/unaligned.h

:::::: TO: Arnd Bergmann <arnd@xxxxxxxx>
:::::: CC: Arnd Bergmann <arnd@xxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux