mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philip Li <philip.li@intel.com>
To: kernel test robot <lkp@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	<oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<x86@kernel.org>, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [tip:locking/rcuref 2/2] arch/sparc/include/asm/cmpxchg_64.h:161:55: sparse: sparse: cast truncates bits from constant value (ffffffffe0000000 becomes 0)
Date: Wed, 12 Apr 2023 20:23:05 +0800	[thread overview]
Message-ID: <ZDaiqQ/6cFIr3Rnt@rli9-mobl> (raw)
In-Reply-To: <202304121909.hsRwqwP8-lkp@intel.com>

On Wed, Apr 12, 2023 at 07:54:59PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/rcuref
> head:   ee1ee6db07795d9637bc5e8993a8ddcf886541ef
> commit: ee1ee6db07795d9637bc5e8993a8ddcf886541ef [2/2] atomics: Provide rcuref - scalable reference counting
> config: sparc-randconfig-s053-20230409 (https://download.01.org/0day-ci/archive/20230412/202304121909.hsRwqwP8-lkp@intel.com/config)
> compiler: sparc64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=ee1ee6db07795d9637bc5e8993a8ddcf886541ef
>         git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
>         git fetch --no-tags tip locking/rcuref
>         git checkout ee1ee6db07795d9637bc5e8993a8ddcf886541ef
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202304121909.hsRwqwP8-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
>    lib/rcuref.c: note: in included file (through arch/sparc/include/asm/cmpxchg.h, arch/sparc/include/asm/atomic_64.h, arch/sparc/include/asm/atomic.h, ...):
> >> arch/sparc/include/asm/cmpxchg_64.h:161:55: sparse: sparse: cast truncates bits from constant value (ffffffffe0000000 becomes 0)

Kindly ignore this, which is a duplication to the input at https://lore.kernel.org/oe-kbuild-all/87k000kuca.ffs@tglx/.

We will update the robot to avoid sending the report against this change.

Thanks

> 
> vim +161 arch/sparc/include/asm/cmpxchg_64.h
> 
> d550bbd40c0e10 David Howells 2012-03-28  155  
> d550bbd40c0e10 David Howells 2012-03-28  156  static inline unsigned long
> d550bbd40c0e10 David Howells 2012-03-28  157  __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
> d550bbd40c0e10 David Howells 2012-03-28  158  {
> d550bbd40c0e10 David Howells 2012-03-28  159  	switch (size) {
> a12ee2349312d7 Babu Moger    2017-05-24  160  		case 1:
> a12ee2349312d7 Babu Moger    2017-05-24 @161  			return __cmpxchg_u8(ptr, old, new);
> d550bbd40c0e10 David Howells 2012-03-28  162  		case 4:
> d550bbd40c0e10 David Howells 2012-03-28  163  			return __cmpxchg_u32(ptr, old, new);
> d550bbd40c0e10 David Howells 2012-03-28  164  		case 8:
> d550bbd40c0e10 David Howells 2012-03-28  165  			return __cmpxchg_u64(ptr, old, new);
> d550bbd40c0e10 David Howells 2012-03-28  166  	}
> d550bbd40c0e10 David Howells 2012-03-28  167  	__cmpxchg_called_with_bad_pointer();
> d550bbd40c0e10 David Howells 2012-03-28  168  	return old;
> d550bbd40c0e10 David Howells 2012-03-28  169  }
> d550bbd40c0e10 David Howells 2012-03-28  170  
> 
> :::::: The code at line 161 was first introduced by commit
> :::::: a12ee2349312d7112b9b7c6ac2e70c5ec2ca334e arch/sparc: Introduce cmpxchg_u8 SPARC
> 
> :::::: TO: Babu Moger <babu.moger@oracle.com>
> :::::: CC: David S. Miller <davem@davemloft.net>
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests
> 

      reply	other threads:[~2023-04-12 12:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 11:54 kernel test robot
2023-04-12 12:23 ` Philip Li [this message]

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=ZDaiqQ/6cFIr3Rnt@rli9-mobl \
    --to=philip.li@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®