lkml.org 
[lkml]   [2020]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/microblaze/include/asm/cmpxchg.h:19:50: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1df0d8960499e58963fd6c8ac75e544f2b417b29
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 8 months ago
config: microblaze-randconfig-s031-20200711 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=microblaze

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


sparse warnings: (new ones prefixed by >>)

>> arch/microblaze/include/asm/cmpxchg.h:19:50: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
>> arch/microblaze/include/asm/cmpxchg.h:19:50: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
>> arch/microblaze/include/asm/cmpxchg.h:19:50: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
>> arch/microblaze/include/asm/cmpxchg.h:19:50: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)
include/asm-generic/cmpxchg-local.h:30:42: sparse: sparse: cast truncates bits from constant value (deadbeef becomes ef)
include/asm-generic/cmpxchg-local.h:34:44: sparse: sparse: cast truncates bits from constant value (deadbeef becomes beef)

vim +19 arch/microblaze/include/asm/cmpxchg.h

c40d04df152a11 David Howells 2012-03-28 8
c40d04df152a11 David Howells 2012-03-28 9 static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
c40d04df152a11 David Howells 2012-03-28 10 int size)
c40d04df152a11 David Howells 2012-03-28 11 {
c40d04df152a11 David Howells 2012-03-28 12 unsigned long ret;
c40d04df152a11 David Howells 2012-03-28 13 unsigned long flags;
c40d04df152a11 David Howells 2012-03-28 14
c40d04df152a11 David Howells 2012-03-28 15 switch (size) {
c40d04df152a11 David Howells 2012-03-28 16 case 1:
c40d04df152a11 David Howells 2012-03-28 17 local_irq_save(flags);
c40d04df152a11 David Howells 2012-03-28 18 ret = *(volatile unsigned char *)ptr;
c40d04df152a11 David Howells 2012-03-28 @19 *(volatile unsigned char *)ptr = x;
c40d04df152a11 David Howells 2012-03-28 20 local_irq_restore(flags);
c40d04df152a11 David Howells 2012-03-28 21 break;
c40d04df152a11 David Howells 2012-03-28 22
c40d04df152a11 David Howells 2012-03-28 23 case 4:
c40d04df152a11 David Howells 2012-03-28 24 local_irq_save(flags);
c40d04df152a11 David Howells 2012-03-28 25 ret = *(volatile unsigned long *)ptr;
c40d04df152a11 David Howells 2012-03-28 26 *(volatile unsigned long *)ptr = x;
c40d04df152a11 David Howells 2012-03-28 27 local_irq_restore(flags);
c40d04df152a11 David Howells 2012-03-28 28 break;
c40d04df152a11 David Howells 2012-03-28 29 default:
c40d04df152a11 David Howells 2012-03-28 30 __bad_xchg(ptr, size), ret = 0;
c40d04df152a11 David Howells 2012-03-28 31 break;
c40d04df152a11 David Howells 2012-03-28 32 }
c40d04df152a11 David Howells 2012-03-28 33
c40d04df152a11 David Howells 2012-03-28 34 return ret;
c40d04df152a11 David Howells 2012-03-28 35 }
c40d04df152a11 David Howells 2012-03-28 36

:::::: The code at line 19 was first introduced by commit
:::::: c40d04df152a1111c5bbcb632278394dabd2b73d Disintegrate asm/system.h for Microblaze

:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-07-11 15:25    [W:0.039 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site