[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202301161346.fO06MpVY-lkp@intel.com>
Date: Mon, 16 Jan 2023 14:01:35 +0800
From: kernel test robot <lkp@...el.com>
To: David Howells <dhowells@...hat.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: arch/x86/include/asm/atomic64_32.h:110:34: sparse: sparse: cast
truncates bits from constant value (100000001 becomes 1)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5dc4c995db9eb45f6373a956eb1f69460e69e6d4
commit: 5d7edbc9231ec6b60f9c5b7e7980e9a1cd92e6bb rxrpc: Get rid of the Rx ring
date: 10 weeks ago
config: i386-randconfig-s002-20230116
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5d7edbc9231ec6b60f9c5b7e7980e9a1cd92e6bb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5d7edbc9231ec6b60f9c5b7e7980e9a1cd92e6bb
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/rxrpc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
net/rxrpc/call_object.c: note: in included file (through arch/x86/include/asm/atomic.h, include/linux/atomic.h, include/linux/jump_label.h, ...):
>> arch/x86/include/asm/atomic64_32.h:110:34: sparse: sparse: cast truncates bits from constant value (100000001 becomes 1)
vim +110 arch/x86/include/asm/atomic64_32.h
1a3b1d89eded68 Brian Gerst 2010-01-07 99
1a3b1d89eded68 Brian Gerst 2010-01-07 100 /**
8bf705d130396e Dmitry Vyukov 2018-01-29 101 * arch_atomic64_set - set atomic64 variable
a7e926abc3adfb Luca Barbieri 2010-02-24 102 * @v: pointer to type atomic64_t
1f0459780c2849 Philipp Hahn 2012-05-02 103 * @i: value to assign
1a3b1d89eded68 Brian Gerst 2010-01-07 104 *
a7e926abc3adfb Luca Barbieri 2010-02-24 105 * Atomically sets the value of @v to @n.
1a3b1d89eded68 Brian Gerst 2010-01-07 106 */
79c53a83d7a31a Mark Rutland 2019-05-22 107 static inline void arch_atomic64_set(atomic64_t *v, s64 i)
a7e926abc3adfb Luca Barbieri 2010-02-24 108 {
a7e926abc3adfb Luca Barbieri 2010-02-24 109 unsigned high = (unsigned)(i >> 32);
a7e926abc3adfb Luca Barbieri 2010-02-24 @110 unsigned low = (unsigned)i;
819165fb34b977 Jan Beulich 2012-01-20 111 alternative_atomic64(set, /* no output */,
819165fb34b977 Jan Beulich 2012-01-20 112 "S" (v), "b" (low), "c" (high)
819165fb34b977 Jan Beulich 2012-01-20 113 : "eax", "edx", "memory");
a7e926abc3adfb Luca Barbieri 2010-02-24 114 }
1a3b1d89eded68 Brian Gerst 2010-01-07 115
:::::: The code at line 110 was first introduced by commit
:::::: a7e926abc3adfbd2e5e20d2b46177adb4e313915 x86-32: Rewrite 32-bit atomic64 functions in assembly
:::::: TO: Luca Barbieri <luca@...a-barbieri.com>
:::::: CC: H. Peter Anvin <hpa@...or.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (160067 bytes)
Powered by blists - more mailing lists