All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Liam Beguin <liambeguin@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Helge Deller <deller@gmx.de>
Subject: arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe)
Date: Tue, 6 Apr 2021 12:21:22 +0800	[thread overview]
Message-ID: <202104061220.nRMBwCXw-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0a50438c84363bd37fe18fe432888ae9a074dcab
commit: b344d6a83d01c52fddbefa6b3b4764da5b1022a0 parisc: add support for cmpxchg on u8 pointers
date:   9 months ago
config: parisc-randconfig-s031-20210406 (attached as .config)
compiler: hppa-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.3-279-g6d5d9b42-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b344d6a83d01c52fddbefa6b3b4764da5b1022a0
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b344d6a83d01c52fddbefa6b3b4764da5b1022a0
        # 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=parisc 

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 >>)
   fs/erofs/zdata.c: note: in included file (through arch/parisc/include/asm/atomic.h, include/linux/atomic.h, arch/parisc/include/asm/bitops.h, ...):
>> arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe)
>> arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe)
>> arch/parisc/include/asm/cmpxchg.h:75:61: sparse: sparse: cast truncates bits from constant value (5f0edead becomes ad)

vim +75 arch/parisc/include/asm/cmpxchg.h

    64	
    65	/* don't worry...optimizer will get rid of most of this */
    66	static inline unsigned long
    67	__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
    68	{
    69		switch (size) {
    70	#ifdef CONFIG_64BIT
    71		case 8: return __cmpxchg_u64((u64 *)ptr, old, new_);
    72	#endif
    73		case 4: return __cmpxchg_u32((unsigned int *)ptr,
    74					     (unsigned int)old, (unsigned int)new_);
  > 75		case 1: return __cmpxchg_u8((u8 *)ptr, (u8)old, (u8)new_);
    76		}
    77		__cmpxchg_called_with_bad_pointer();
    78		return old;
    79	}
    80	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe)
Date: Tue, 06 Apr 2021 12:21:22 +0800	[thread overview]
Message-ID: <202104061220.nRMBwCXw-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0a50438c84363bd37fe18fe432888ae9a074dcab
commit: b344d6a83d01c52fddbefa6b3b4764da5b1022a0 parisc: add support for cmpxchg on u8 pointers
date:   9 months ago
config: parisc-randconfig-s031-20210406 (attached as .config)
compiler: hppa-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.3-279-g6d5d9b42-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b344d6a83d01c52fddbefa6b3b4764da5b1022a0
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b344d6a83d01c52fddbefa6b3b4764da5b1022a0
        # 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=parisc 

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 >>)
   fs/erofs/zdata.c: note: in included file (through arch/parisc/include/asm/atomic.h, include/linux/atomic.h, arch/parisc/include/asm/bitops.h, ...):
>> arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe)
>> arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe)
>> arch/parisc/include/asm/cmpxchg.h:75:61: sparse: sparse: cast truncates bits from constant value (5f0edead becomes ad)

vim +75 arch/parisc/include/asm/cmpxchg.h

    64	
    65	/* don't worry...optimizer will get rid of most of this */
    66	static inline unsigned long
    67	__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
    68	{
    69		switch (size) {
    70	#ifdef CONFIG_64BIT
    71		case 8: return __cmpxchg_u64((u64 *)ptr, old, new_);
    72	#endif
    73		case 4: return __cmpxchg_u32((unsigned int *)ptr,
    74					     (unsigned int)old, (unsigned int)new_);
  > 75		case 1: return __cmpxchg_u8((u8 *)ptr, (u8)old, (u8)new_);
    76		}
    77		__cmpxchg_called_with_bad_pointer();
    78		return old;
    79	}
    80	

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

             reply	other threads:[~2021-04-06  4:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  4:21 kernel test robot [this message]
2021-04-06  4:21 ` arch/parisc/include/asm/cmpxchg.h:75:52: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe) kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202104061220.nRMBwCXw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=deller@gmx.de \
    --cc=kbuild-all@lists.01.org \
    --cc=liambeguin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.