From patchwork Tue Oct 8 10:59:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 3002901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2C278BF924 for ; Tue, 8 Oct 2013 11:00:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D294201EF for ; Tue, 8 Oct 2013 11:00:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 802ED201E9 for ; Tue, 8 Oct 2013 11:00:50 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTV1y-0005Mp-Nh; Tue, 08 Oct 2013 11:00:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTV1v-0003MA-Ln; Tue, 08 Oct 2013 11:00:43 +0000 Received: from intranet.asianux.com ([58.214.24.6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTV1q-0003Kg-KT for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2013 11:00:40 +0000 Received: by intranet.asianux.com (Postfix, from userid 103) id 3CD481840383; Tue, 8 Oct 2013 19:00:16 +0800 (CST) X-Spam-Score: -100.8 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from [10.1.100.108] (unknown [61.148.203.198]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranet.asianux.com (Postfix) with ESMTP id 2D3851840242; Tue, 8 Oct 2013 19:00:15 +0800 (CST) Message-ID: <5253E583.5020805@asianux.com> Date: Tue, 08 Oct 2013 18:59:15 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Will Deacon , Catalin Marinas Subject: [PATCH v2 2/2] ARM: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomic_cmpxchg(). References: <20131002104158.GD28311@mudshark.cambridge.arm.com> <524C3981.20307@asianux.com> <524D416B.5090709@asianux.com> <20131003163200.GE7408@mudshark.cambridge.arm.com> <524E8FBC.2080200@asianux.com> <20131004153742.GR24303@mudshark.cambridge.arm.com> <20131004154208.GS24303@mudshark.cambridge.arm.com> <524F5566.4010204@asianux.com> <524F594B.1070106@asianux.com> <525385A4.5050200@asianux.com> <20131008103455.GF17148@mudshark.cambridge.arm.com> <5253E4F3.4090205@asianux.com> <5253E533.4070803@asianux.com> In-Reply-To: <5253E533.4070803@asianux.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131008_070038_983582_A8BF18EE X-CRM114-Status: GOOD ( 13.98 ) X-Spam-Score: -2.2 (--) Cc: Russell King - ARM Linux , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP For atomic_cmpxchg(), the type of 'oldval' need be 'int' to match the type of "*ptr" (used by 'ldrex' instruction) and 'old' (used by 'teq' instruction). Signed-off-by: Chen Gang --- arch/arm/include/asm/atomic.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index a715ac0..9ee7e01 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h @@ -114,7 +114,8 @@ static inline int atomic_sub_return(int i, atomic_t *v) static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) { - unsigned long oldval, res; + int oldval; + unsigned long res; smp_mb();