Received: by 10.213.65.68 with SMTP id h4csp98274imn; Mon, 12 Mar 2018 07:55:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELtKal2NK5am6acs94BC6023XEbrn/Gwjm3J7v3HFeWhyrAG+2mbuEVAG9Xi+nxkkNIMx+7I X-Received: by 10.99.116.70 with SMTP id e6mr6871801pgn.256.1520866504710; Mon, 12 Mar 2018 07:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520866504; cv=none; d=google.com; s=arc-20160816; b=yVSjO3qEqpl1k/lgjKV8Kl+P+OvLmGBhaFeqPefnanCDNU6ZZUDim10zomWa3dfthP QisY9AjcW+r737kF6mUQ+GcQCFdODRjLjDqmxXFi5n74IToNr8rioZeOQCPW7K6XKLmW UvRYnskN+KynIzapxyu6JmhJnh22pzVowEnz6gmwwbGUr3XKZNTanmts6PaB7Q/FEU2H iv/Mo1S6d/5HusrGdDKdo9XnI3Fp16k1FeVLRUqno7RqgdrWjyeTgo+GfyB+ZBqXjmjG kU5R9+Q6hMqfr+JBW0hoLglWLPUW6orOZ3Ef/W+daO+xWT8Ae/tmpgCUdesiVNknvLNc C+vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=fGBP1NBlb7fHugKbOLp5+826TeYLZZZfM5uBCvsr6tw=; b=0kDWd7jy8QToP3lan8NKu3qfRqrz1jNaa9YRsTEi3AoCBk+gPWpLUqNpGVhGYVG2/a 8PHvkW4cJWGfdBk7DQROXoDmM6U61kOtDVJzeMDyMDorCoTdzPfNWSb85Opbn0Az5Uia /gJlIDeF+2Jitdjntunbrosvwan/fuU4X9q9/JznroSgtAkw3P7w3KYZlaieMPNUSv0J 5tNx7Iz+6hi1SNTd90jfCcCcS+I95C9iY8zFH08gAspbY6M5YvB9qQUlOYAR6H6sLMVU V9FY/sUJA65R9b4VdY9XPHwdmZ5aHJtylwm5DYyJNPRKUgiEDcX5rcP0dlrCOM1s4ecH cHig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e16si1574226pgq.596.2018.03.12.07.54.49; Mon, 12 Mar 2018 07:55:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbeCLOwi (ORCPT + 99 others); Mon, 12 Mar 2018 10:52:38 -0400 Received: from mga17.intel.com ([192.55.52.151]:4403 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbeCLOwh (ORCPT ); Mon, 12 Mar 2018 10:52:37 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 07:52:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,461,1515484800"; d="scan'208";a="23617461" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga007.fm.intel.com with ESMTP; 12 Mar 2018 07:52:35 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1evOnS-000XbL-5V; Mon, 12 Mar 2018 22:51:30 +0800 Date: Mon, 12 Mar 2018 22:52:21 +0800 From: kbuild test robot To: Dmitry Vyukov Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, tipbuild@zytor.com, Ingo Molnar Subject: [tip:locking/core 9/11] include/asm-generic/atomic-instrumented.h:288:24: sparse: cast truncates bits from constant value (100 becomes 0) Message-ID: <201803122219.vHl3IwRo%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core head: ac605bee0bfab40fd5d11964705e907d2d5a32de commit: 8bf705d130396e69c04cd8e6e010244ad2ce71f4 [9/11] locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h reproduce: # apt-get install sparse git checkout 8bf705d130396e69c04cd8e6e010244ad2ce71f4 make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) kernel/locking/qspinlock.c:418:22: sparse: incorrect type in assignment (different modifiers) @@ expected struct mcs_spinlock *prev @@ got struct struct mcs_spinlock *prev @@ kernel/locking/qspinlock.c:418:22: expected struct mcs_spinlock *prev kernel/locking/qspinlock.c:418:22: got struct mcs_spinlock [pure] * kernel/locking/qspinlock_paravirt.h:519:1: sparse: symbol '__pv_queued_spin_unlock_slowpath' was not declared. Should it be static? kernel/locking/qspinlock.c:418:22: sparse: incorrect type in assignment (different modifiers) @@ expected struct mcs_spinlock *prev @@ got struct struct mcs_spinlock *prev @@ kernel/locking/qspinlock.c:418:22: expected struct mcs_spinlock *prev kernel/locking/qspinlock.c:418:22: got struct mcs_spinlock [pure] * >> include/asm-generic/atomic-instrumented.h:288:24: sparse: cast truncates bits from constant value (100 becomes 0) vim +288 include/asm-generic/atomic-instrumented.h b06ed71a6 Dmitry Vyukov 2018-01-29 282 b06ed71a6 Dmitry Vyukov 2018-01-29 283 static __always_inline unsigned long b06ed71a6 Dmitry Vyukov 2018-01-29 284 cmpxchg_size(volatile void *ptr, unsigned long old, unsigned long new, int size) b06ed71a6 Dmitry Vyukov 2018-01-29 285 { b06ed71a6 Dmitry Vyukov 2018-01-29 286 switch (size) { b06ed71a6 Dmitry Vyukov 2018-01-29 287 case 1: b06ed71a6 Dmitry Vyukov 2018-01-29 @288 return arch_cmpxchg((u8 *)ptr, (u8)old, (u8)new); b06ed71a6 Dmitry Vyukov 2018-01-29 289 case 2: b06ed71a6 Dmitry Vyukov 2018-01-29 290 return arch_cmpxchg((u16 *)ptr, (u16)old, (u16)new); b06ed71a6 Dmitry Vyukov 2018-01-29 291 case 4: b06ed71a6 Dmitry Vyukov 2018-01-29 292 return arch_cmpxchg((u32 *)ptr, (u32)old, (u32)new); b06ed71a6 Dmitry Vyukov 2018-01-29 293 case 8: b06ed71a6 Dmitry Vyukov 2018-01-29 294 BUILD_BUG_ON(sizeof(unsigned long) != 8); b06ed71a6 Dmitry Vyukov 2018-01-29 295 return arch_cmpxchg((u64 *)ptr, (u64)old, (u64)new); b06ed71a6 Dmitry Vyukov 2018-01-29 296 } b06ed71a6 Dmitry Vyukov 2018-01-29 297 BUILD_BUG(); b06ed71a6 Dmitry Vyukov 2018-01-29 298 return 0; b06ed71a6 Dmitry Vyukov 2018-01-29 299 } b06ed71a6 Dmitry Vyukov 2018-01-29 300 :::::: The code at line 288 was first introduced by commit :::::: b06ed71a624ba088a3e3e3ac7d4185f48c7c1660 locking/atomic, asm-generic: Add asm-generic/atomic-instrumented.h :::::: TO: Dmitry Vyukov :::::: CC: Ingo Molnar --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation