From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gnuweeb.org (Postfix) with ESMTPS id 35D7F7E70A for ; Sat, 26 Mar 2022 01:51:52 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nK4Yh7r5; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648259512; x=1679795512; h=date:from:to:cc:subject:message-id:mime-version; bh=XKeDtx+e7Z6XXOcCQX3+ybtBW979kFPfT0nbtssEJFg=; b=nK4Yh7r5vlKZNby8zBwuQRKlMBvU28xYnzMEVQqx+qhkMLW+6NOq7t1u hW71pdR4CkQrhFAxQz4tcXJrxeINeF/+fZwDL6VrCwbF3qnLq+fqGCBpR 2BUdHInAzkFBDBVa3y1RCklJmYIGwACjsZ6JQ5nKAcPcITHZiDzVukoBx LAfUHCnRMQGKiM6pfA6jddcia2kdg0t1yPESLNJG1S/Mc1YAgVbRT+cEI rD262bRekrb8axdnq8Ka9metyWIrny4mS7aR7IRIHvuM/P6ShrjKTRzoI wJFw93QzDdFar3QXuVHH14LgLcrFOWkYNNPET/bw9AUEAXKgI715PYGcV w==; X-IronPort-AV: E=McAfee;i="6200,9189,10297"; a="246235099" X-IronPort-AV: E=Sophos;i="5.90,211,1643702400"; d="scan'208";a="246235099" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2022 18:51:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,211,1643702400"; d="scan'208";a="650425845" Received: from lkp-server02.sh.intel.com (HELO 89b41b6ae01c) ([10.239.97.151]) by orsmga004.jf.intel.com with ESMTP; 25 Mar 2022 18:51:50 -0700 Received: from kbuild by 89b41b6ae01c with local (Exim 4.92) (envelope-from ) id 1nXvan-000MrJ-4M; Sat, 26 Mar 2022 01:51:49 +0000 Date: Sat, 26 Mar 2022 09:50:50 +0800 From: kernel test robot To: David Howells Cc: kbuild-all@lists.01.org, GNU/Weeb Mailing List , linux-kernel@vger.kernel.org Subject: [ammarfaizi2-block:dhowells/linux-fs/afs-testing 44/44] include/asm-generic/cmpxchg.h:35:39: sparse: sparse: cast truncates bits from constant value (5e5ee5e5 becomes e5) Message-ID: <202203260941.OiKX28fM-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/afs-testing head: 1eba43e7cea9100a3767c5a7212ec5f1db4db4fd commit: 1eba43e7cea9100a3767c5a7212ec5f1db4db4fd [44/44] Check for dead timer config: nios2-randconfig-s032-20220324 (https://download.01.org/0day-ci/archive/20220326/202203260941.OiKX28fM-lkp@intel.com/config) compiler: nios2-linux-gcc (GCC) 11.2.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-dirty # https://github.com/ammarfaizi2/linux-block/commit/1eba43e7cea9100a3767c5a7212ec5f1db4db4fd git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/afs-testing git checkout 1eba43e7cea9100a3767c5a7212ec5f1db4db4fd # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash kernel/time/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) kernel/time/timer.c: note: in included file (through arch/nios2/include/generated/asm/cmpxchg.h, include/asm-generic/atomic.h, arch/nios2/include/generated/asm/atomic.h, ...): >> include/asm-generic/cmpxchg.h:35:39: sparse: sparse: cast truncates bits from constant value (5e5ee5e5 becomes e5) >> include/asm-generic/cmpxchg.h:46:40: sparse: sparse: cast truncates bits from constant value (5e5ee5e5 becomes e5e5) vim +35 include/asm-generic/cmpxchg.h b4816afa3986704 David Howells 2012-03-28 22 b4816afa3986704 David Howells 2012-03-28 23 static inline 82b993e8249ae3c Mark Rutland 2021-05-25 24 unsigned long __generic_xchg(unsigned long x, volatile void *ptr, int size) b4816afa3986704 David Howells 2012-03-28 25 { b4816afa3986704 David Howells 2012-03-28 26 unsigned long ret, flags; b4816afa3986704 David Howells 2012-03-28 27 b4816afa3986704 David Howells 2012-03-28 28 switch (size) { b4816afa3986704 David Howells 2012-03-28 29 case 1: b4816afa3986704 David Howells 2012-03-28 30 #ifdef __xchg_u8 b4816afa3986704 David Howells 2012-03-28 31 return __xchg_u8(x, ptr); b4816afa3986704 David Howells 2012-03-28 32 #else b4816afa3986704 David Howells 2012-03-28 33 local_irq_save(flags); b4816afa3986704 David Howells 2012-03-28 34 ret = *(volatile u8 *)ptr; b4816afa3986704 David Howells 2012-03-28 @35 *(volatile u8 *)ptr = x; b4816afa3986704 David Howells 2012-03-28 36 local_irq_restore(flags); b4816afa3986704 David Howells 2012-03-28 37 return ret; b4816afa3986704 David Howells 2012-03-28 38 #endif /* __xchg_u8 */ b4816afa3986704 David Howells 2012-03-28 39 b4816afa3986704 David Howells 2012-03-28 40 case 2: b4816afa3986704 David Howells 2012-03-28 41 #ifdef __xchg_u16 b4816afa3986704 David Howells 2012-03-28 42 return __xchg_u16(x, ptr); b4816afa3986704 David Howells 2012-03-28 43 #else b4816afa3986704 David Howells 2012-03-28 44 local_irq_save(flags); b4816afa3986704 David Howells 2012-03-28 45 ret = *(volatile u16 *)ptr; b4816afa3986704 David Howells 2012-03-28 @46 *(volatile u16 *)ptr = x; b4816afa3986704 David Howells 2012-03-28 47 local_irq_restore(flags); b4816afa3986704 David Howells 2012-03-28 48 return ret; b4816afa3986704 David Howells 2012-03-28 49 #endif /* __xchg_u16 */ b4816afa3986704 David Howells 2012-03-28 50 b4816afa3986704 David Howells 2012-03-28 51 case 4: b4816afa3986704 David Howells 2012-03-28 52 #ifdef __xchg_u32 b4816afa3986704 David Howells 2012-03-28 53 return __xchg_u32(x, ptr); b4816afa3986704 David Howells 2012-03-28 54 #else b4816afa3986704 David Howells 2012-03-28 55 local_irq_save(flags); b4816afa3986704 David Howells 2012-03-28 56 ret = *(volatile u32 *)ptr; b4816afa3986704 David Howells 2012-03-28 57 *(volatile u32 *)ptr = x; b4816afa3986704 David Howells 2012-03-28 58 local_irq_restore(flags); b4816afa3986704 David Howells 2012-03-28 59 return ret; b4816afa3986704 David Howells 2012-03-28 60 #endif /* __xchg_u32 */ b4816afa3986704 David Howells 2012-03-28 61 :::::: The code at line 35 was first introduced by commit :::::: b4816afa3986704d1404fc48e931da5135820472 Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h :::::: TO: David Howells :::::: CC: David Howells -- 0-DAY CI Kernel Test Service https://01.org/lkp