From patchwork Wed May 22 13:22:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 164822 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp860151ili; Wed, 22 May 2019 06:24:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyn0CE7liv8RVYQWSPPwbCVwxXSel4UMYrhrODI/QkFFmDDMZ+89eOqhX2SrGNOkSWDOk3I X-Received: by 2002:a17:902:5ac8:: with SMTP id g8mr62367456plm.154.1558531465474; Wed, 22 May 2019 06:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558531465; cv=none; d=google.com; s=arc-20160816; b=kcF8/buNaf0J02akCPwf6Xau3c0tI2nt1MqVuxhekbHDpP52ANLxTSLZmHWT2wuMSi YUSLN12uMIlsR3DgqX7DC4AH+gmhOHa6oXnOQgk2Ubb/aODVwf/S6Ei4yu2tZJr9jNqP MJE+vauoyfntmFQ6LhOmJfvknP+G93AS03c2iWXuba2IOttA06Pc1IQehjIyhVyBRY+G 5+TOVa20lhLmLLcwd7BMMeGTC8ITAypp75T2HGzcq/yiCTBtp/e34UL84mMztQm1xUEc uomvDMoLUsvpaD0ciTlYd7/GLfklg4aokg7kG9LiZ+6DfVchUBtmOp1cWzYsk1ojhj3F cCqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=xQZfYUn2NQaBPzMJ3jmfpDW9UrUuCMn3K75RxkRbJzM=; b=XJ0Z+ioACmtiCYbGF+le9MLIaf6KfXNIWAVOMWhyTOq2ctXIvtse/1cIqBg50wdQvj aKx25HD5JHybnHRf1nLHctZMcQltm6rKbW8OzYlMzwjOK+8rp2ip3hBc29l0qtB0Deyj DQE4X9RH/zLF4EbtPGOw8tMzROkXGJ7BAmMEAo4eONrA9zlK1/tTna5uoJ5/ha3B0iYV r/Y577IwUU++KeSKe9+ckKMwlAxVoBBgeyhUZCWz1p1prNVIrQlGu6zlpkomQGpsq7sf AFJaCjs7+g24DO8eGwCWOoWDQry8VQ/lflSqlM7udT3LhaCIN/sPjTKBUGtydEjM7G2l DeAQ== 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 t24si25848037pga.495.2019.05.22.06.24.25; Wed, 22 May 2019 06:24:25 -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 S1729574AbfEVNYY (ORCPT + 30 others); Wed, 22 May 2019 09:24:24 -0400 Received: from foss.arm.com ([217.140.101.70]:50714 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729161AbfEVNYW (ORCPT ); Wed, 22 May 2019 09:24:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 836CD80D; Wed, 22 May 2019 06:24:21 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 438E03F575; Wed, 22 May 2019 06:24:17 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com Cc: aou@eecs.berkeley.edu, arnd@arndb.de, bp@alien8.de, catalin.marinas@arm.com, davem@davemloft.net, fenghua.yu@intel.com, heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, ink@jurassic.park.msu.ru, jhogan@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, mattst88@gmail.com, mingo@kernel.org, mpe@ellerman.id.au, palmer@sifive.com, paul.burton@mips.com, paulus@samba.org, ralf@linux-mips.org, rth@twiddle.net, stable@vger.kernel.org, tglx@linutronix.de, tony.luck@intel.com, vgupta@synopsys.com Subject: [PATCH 05/18] locking/atomic: arc: use s64 for atomic64 Date: Wed, 22 May 2019 14:22:37 +0100 Message-Id: <20190522132250.26499-6-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190522132250.26499-1-mark.rutland@arm.com> References: <20190522132250.26499-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As a step towards making the atomic64 API use consistent types treewide, let's have the arc atomic64 implementation use s64 as the underlying type for atomic64_t, rather than u64, matching the generated headers. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Peter Zijlstra Cc: Vineet Gupta Cc: Will Deacon --- arch/arc/include/asm/atomic.h | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) -- 2.11.0 diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h index 158af079838d..2c75df55d0d2 100644 --- a/arch/arc/include/asm/atomic.h +++ b/arch/arc/include/asm/atomic.h @@ -324,14 +324,14 @@ ATOMIC_OPS(xor, ^=, CTOP_INST_AXOR_DI_R2_R2_R3) */ typedef struct { - aligned_u64 counter; + s64 __aligned(8) counter; } atomic64_t; #define ATOMIC64_INIT(a) { (a) } -static inline long long atomic64_read(const atomic64_t *v) +static inline s64 atomic64_read(const atomic64_t *v) { - unsigned long long val; + s64 val; __asm__ __volatile__( " ldd %0, [%1] \n" @@ -341,7 +341,7 @@ static inline long long atomic64_read(const atomic64_t *v) return val; } -static inline void atomic64_set(atomic64_t *v, long long a) +static inline void atomic64_set(atomic64_t *v, s64 a) { /* * This could have been a simple assignment in "C" but would need @@ -362,9 +362,9 @@ static inline void atomic64_set(atomic64_t *v, long long a) } #define ATOMIC64_OP(op, op1, op2) \ -static inline void atomic64_##op(long long a, atomic64_t *v) \ +static inline void atomic64_##op(s64 a, atomic64_t *v) \ { \ - unsigned long long val; \ + s64 val; \ \ __asm__ __volatile__( \ "1: \n" \ @@ -375,13 +375,13 @@ static inline void atomic64_##op(long long a, atomic64_t *v) \ " bnz 1b \n" \ : "=&r"(val) \ : "r"(&v->counter), "ir"(a) \ - : "cc"); \ + : "cc"); \ } \ #define ATOMIC64_OP_RETURN(op, op1, op2) \ -static inline long long atomic64_##op##_return(long long a, atomic64_t *v) \ +static inline s64 atomic64_##op##_return(s64 a, atomic64_t *v) \ { \ - unsigned long long val; \ + s64 val; \ \ smp_mb(); \ \ @@ -402,9 +402,9 @@ static inline long long atomic64_##op##_return(long long a, atomic64_t *v) \ } #define ATOMIC64_FETCH_OP(op, op1, op2) \ -static inline long long atomic64_fetch_##op(long long a, atomic64_t *v) \ +static inline s64 atomic64_fetch_##op(s64 a, atomic64_t *v) \ { \ - unsigned long long val, orig; \ + s64 val, orig; \ \ smp_mb(); \ \ @@ -444,10 +444,10 @@ ATOMIC64_OPS(xor, xor, xor) #undef ATOMIC64_OP_RETURN #undef ATOMIC64_OP -static inline long long -atomic64_cmpxchg(atomic64_t *ptr, long long expected, long long new) +static inline s64 +atomic64_cmpxchg(atomic64_t *ptr, s64 expected, s64 new) { - long long prev; + s64 prev; smp_mb(); @@ -467,9 +467,9 @@ atomic64_cmpxchg(atomic64_t *ptr, long long expected, long long new) return prev; } -static inline long long atomic64_xchg(atomic64_t *ptr, long long new) +static inline s64 atomic64_xchg(atomic64_t *ptr, s64 new) { - long long prev; + s64 prev; smp_mb(); @@ -495,9 +495,9 @@ static inline long long atomic64_xchg(atomic64_t *ptr, long long new) * the atomic variable, v, was not decremented. */ -static inline long long atomic64_dec_if_positive(atomic64_t *v) +static inline s64 atomic64_dec_if_positive(atomic64_t *v) { - long long val; + s64 val; smp_mb(); @@ -528,10 +528,9 @@ static inline long long atomic64_dec_if_positive(atomic64_t *v) * Atomically adds @a to @v, if it was not @u. * Returns the old value of @v */ -static inline long long atomic64_fetch_add_unless(atomic64_t *v, long long a, - long long u) +static inline s64 atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u) { - long long old, temp; + s64 old, temp; smp_mb(); From patchwork Wed May 22 13:22:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 164828 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp861056ili; Wed, 22 May 2019 06:25:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgbZtHCT0Xxt3qbmgEwKXqzqsFJ9OYirMJwcINGhRuXl2AtZZfcO6KptmJV1uU3oMRkvUL X-Received: by 2002:a63:6848:: with SMTP id d69mr91704937pgc.0.1558531510530; Wed, 22 May 2019 06:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558531510; cv=none; d=google.com; s=arc-20160816; b=Yvfgvy2Pm6aiJxYOfsDB6JQ0Wgi188WvMVdSVyX8lV5rjg4Ub4jFk6rAU8y6V5waCy VHVfPBJHZxJxGfsBU03m3HJ5x+wK0fKokcSn+Tm0cFUKlmIq8iFdDAY5IAgvHC5lEWOQ k3hJdlNqgZvotTDjXoUabOALDbqULqcuAgY5JrYmunpf1WuTpKg6YaSu1oPzUYMu/z/d WVa3sXgLDSAlJ7lkq1+z/Msk8TYdRpuruGIdCIgv/4gjFLhT2ohZEvyZlRP56tErOusC Gn0De/mL5bbP16zt2hOL1/YYaroJxkiE0DnaYeyw7UTHZDNBAOn3WN8OctUf5cuA2veq oYXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Y3a3DtL5vxb30QvjeCe0BFxibn7kZxuICtdDZY9FYmY=; b=U5No/1W3dESCg2mYgsYY6iUssGtQBRPqU6r1yhT6L6GfwSzBmF2FBPy9kxOUrIrrpm kIqHzCa82yw3XPLXRGUSMijOep0X/O4peqbkomINNZ5kmIp13WVur3VSErBoZqgZ9YaT Ob8rdsqXTThSt1eWEO5Vz6gLh9+cA9OiMyYdzyrdFHfC3C+8vvvJ3KhGpZOYFh/0qQkJ T7GM3y+mqbpNXhrrRqdcB2IOZWpumc52URK1c92SRS6XmarWaFvRNZkGUVQx64lSXk27 ygMjenvP7wtDm46vHzMeQrFpRv9s2RQliB+kYFyGAx/mDv7cp2XLi3vPgy8mXDiy+XMm fBmQ== 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 f191si24087456pgc.570.2019.05.22.06.25.05; Wed, 22 May 2019 06:25:10 -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 S1729673AbfEVNZE (ORCPT + 30 others); Wed, 22 May 2019 09:25:04 -0400 Received: from foss.arm.com ([217.140.101.70]:51026 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729324AbfEVNZD (ORCPT ); Wed, 22 May 2019 09:25:03 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC72715AB; Wed, 22 May 2019 06:25:02 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A32BB3F575; Wed, 22 May 2019 06:24:58 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com Cc: aou@eecs.berkeley.edu, arnd@arndb.de, bp@alien8.de, catalin.marinas@arm.com, davem@davemloft.net, fenghua.yu@intel.com, heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, ink@jurassic.park.msu.ru, jhogan@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, mattst88@gmail.com, mingo@kernel.org, mpe@ellerman.id.au, palmer@sifive.com, paul.burton@mips.com, paulus@samba.org, ralf@linux-mips.org, rth@twiddle.net, stable@vger.kernel.org, tglx@linutronix.de, tony.luck@intel.com, vgupta@synopsys.com Subject: [PATCH 11/18] locking/atomic: riscv: fix atomic64_sub_if_positive() offset argument Date: Wed, 22 May 2019 14:22:43 +0100 Message-Id: <20190522132250.26499-12-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190522132250.26499-1-mark.rutland@arm.com> References: <20190522132250.26499-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Presently the riscv implementation of atomic64_sub_if_positive() takes a 32-bit offset value rather than a 64-bit offset value as it should do. Thus, if called with a 64-bit offset, the value will be unexpectedly truncated to 32 bits. Fix this by taking the offset as a long rather than an int. Signed-off-by: Mark Rutland Cc: Albert Ou Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: Will Deacon Cc: stable@vger.kernel.org --- arch/riscv/include/asm/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/arch/riscv/include/asm/atomic.h b/arch/riscv/include/asm/atomic.h index 93826771b616..c9e18289d65c 100644 --- a/arch/riscv/include/asm/atomic.h +++ b/arch/riscv/include/asm/atomic.h @@ -336,7 +336,7 @@ static __always_inline int atomic_sub_if_positive(atomic_t *v, int offset) #define atomic_dec_if_positive(v) atomic_sub_if_positive(v, 1) #ifndef CONFIG_GENERIC_ATOMIC64 -static __always_inline long atomic64_sub_if_positive(atomic64_t *v, int offset) +static __always_inline long atomic64_sub_if_positive(atomic64_t *v, long offset) { long prev, rc; From patchwork Wed May 22 13:22:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 164834 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp861685ili; Wed, 22 May 2019 06:25:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzddR5TV5VkwtHPnLlHlLGgfE7y93SnUn5V5aMy9rJbLq0Az92STb2nPWJK2aYRuAOFrSKp X-Received: by 2002:a17:902:163:: with SMTP id 90mr91512862plb.212.1558531546413; Wed, 22 May 2019 06:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558531546; cv=none; d=google.com; s=arc-20160816; b=tZE39wx2aiixXBluN/0XMMAWKKoGcuqWIFkA83UjNJpgkhdwgQxXBuh8Ot6GHz+JCt 25TI2sd0Aa0faX1JrrjTtZiCjtig/Ha9i0rD48ZZXaWT6BZQmH7CfJrrNU3QajcKFXiZ Ct9XQXuI7Xx8NjUCDSLiliUT4anbCuzHDYKgtpsz3sxgMdmF7ebHrGfcfliF8Iswixu6 KnbartB9hJyuHd3or76UQWvJkOvhkOzg88aP6aS6b/EbLbRWcYzp3d8liT+7M3Wbuaae RJBhKYKB9FMrtuVWz/ZzjZjeb8klH9FyC2PpbYX5q0mrYkv8xpiGsTj+r/zkVzJxL3Nh zuag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=3jBeT9JORHGiKIekNKwVajSCjOG77ZXWMfTmPqk7qeE=; b=YX92db3b3Ph8XBw7XX04/6tTtYul9QIIHCIjFF6K6FMLc5Ptb1hoaBm6CnM46WMoUW c+Dvok41adZgVuQuHetH0LRDQwvUPy74LbCQmNLokDBZRA1r0G6FPQ06d2m6mkhdBxLK LjfoCLuKC+pNrI+k3Bmw8GlCCQOHg2Of0liC+BWPGraIn2n6xH0uJIbEAM+yDyTpR/0E IM3rBzfZQtkMi+01JC3CwpbnevxczujSsO30s/QsCg2q9MpVoDIXKRwCC7ej20yOry0D lePe8OAittMPu34mAPE+QALOUXKcovvkV6ESNrN3rhhF9SgPEz6cq0Jkkz6ypvlZ5j8C biFA== 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 a24si24195032pls.372.2019.05.22.06.25.46; Wed, 22 May 2019 06:25:46 -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 S1729744AbfEVNZp (ORCPT + 30 others); Wed, 22 May 2019 09:25:45 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51338 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbfEVNZo (ORCPT ); Wed, 22 May 2019 09:25:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9BFFF80D; Wed, 22 May 2019 06:25:43 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5ACE53F575; Wed, 22 May 2019 06:25:39 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com Cc: aou@eecs.berkeley.edu, arnd@arndb.de, bp@alien8.de, catalin.marinas@arm.com, davem@davemloft.net, fenghua.yu@intel.com, heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, ink@jurassic.park.msu.ru, jhogan@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, mattst88@gmail.com, mingo@kernel.org, mpe@ellerman.id.au, palmer@sifive.com, paul.burton@mips.com, paulus@samba.org, ralf@linux-mips.org, rth@twiddle.net, stable@vger.kernel.org, tglx@linutronix.de, tony.luck@intel.com, vgupta@synopsys.com Subject: [PATCH 17/18] locking/atomic: crypto: nx: remove redundant casts Date: Wed, 22 May 2019 14:22:49 +0100 Message-Id: <20190522132250.26499-18-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190522132250.26499-1-mark.rutland@arm.com> References: <20190522132250.26499-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that atomic64_read() returns s64 consistently, we don't need to explicitly cast its return value. Drop the redundant casts. Signed-off-by: Mark Rutland Cc: Herbert Xu Cc: Peter Zijlstra Cc: Will Deacon --- drivers/crypto/nx/nx-842-pseries.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/drivers/crypto/nx/nx-842-pseries.c b/drivers/crypto/nx/nx-842-pseries.c index 9432e9e42afe..5cf77729a438 100644 --- a/drivers/crypto/nx/nx-842-pseries.c +++ b/drivers/crypto/nx/nx-842-pseries.c @@ -870,7 +870,7 @@ static ssize_t nx842_##_name##_show(struct device *dev, \ local_devdata = rcu_dereference(devdata); \ if (local_devdata) \ p = snprintf(buf, PAGE_SIZE, "%lld\n", \ - (s64)atomic64_read(&local_devdata->counters->_name)); \ + atomic64_read(&local_devdata->counters->_name)); \ rcu_read_unlock(); \ return p; \ } @@ -924,7 +924,7 @@ static ssize_t nx842_timehist_show(struct device *dev, for (i = 0; i < (NX842_HIST_SLOTS - 2); i++) { bytes = snprintf(p, bytes_remain, "%u-%uus:\t%lld\n", i ? (2<<(i-1)) : 0, (2< X-Patchwork-Id: 164835 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp861754ili; Wed, 22 May 2019 06:25:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyd4TiAob2khPVvLL1iBIjSedadCSOGAniOnKypn2sRpRvvMvpDK6qkdYODJgZ+XDbIrgFa X-Received: by 2002:a62:38d3:: with SMTP id f202mr50517936pfa.41.1558531551027; Wed, 22 May 2019 06:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558531551; cv=none; d=google.com; s=arc-20160816; b=BELGyM05n2VTat46KD97Gqea0dYgbb3bnagstcN2R+N38jxJrbdKectF8QKI8xFNL5 WYHQmbcSuBOll6Gy21hzyxz9PVGRkWp34DD3zVMV8qRMi7djeBVMTU4VQC26bcgvVvEN a9tb+Ony4A6GCdGZ4UCpDLkVGndPQRIxeOZthl9/Ir/KH1hEGVIQjlyrsPJbEULzf6xr z8H/CDYk17kC7s4dg00Mw0AoStyYsuokMvIZK4RBNt3LmO78U5KifPTu00khZ3s/0nSZ WUQCmwfhYcp/qWTasT9C4osqsdv8D4icm7MVxepZVj1ZowTWZQASYb3mV2bUvkWb+SJ8 7ANQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=1n3t5k6BJvLXCsEEs6lWKs7vnM9fpXZ5PtdBLSWB5oY=; b=b1eAFngsdmL7c5NZ8PruPkfJ2JB+6csoUSC/A/yTgKri+zk9OLHrwMj9DQ5S0AwTOF 3xfoc9ZfbmDQ2hwZDmVDOPLKXeygI/WlI4JvCZmSiHgzmGHj2x29H+PV+GQaXXwPFJ5R u0qee+e4PYVeTnkNQm6K01Zr45N4q715fBTobFtHuwtx90HwhkMlr+uPuhboW85nm/Ol NBQqLqgRTUCZ+v8Ise4VnsRuzwV4TvRMJ5j4wQXPLaDvAkxTkh1L4+MpWEi/miuQWFo4 ehYLmBQAnz3QNAmLATbRbe6Bopf2kRObiG/RfduA7n5qWeZ7QjveWuURruVEJMgxdRJl UJXQ== 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 d2si25825471pln.43.2019.05.22.06.25.50; Wed, 22 May 2019 06:25:51 -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 S1729769AbfEVNZu (ORCPT + 30 others); Wed, 22 May 2019 09:25:50 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51396 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729126AbfEVNZt (ORCPT ); Wed, 22 May 2019 09:25:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC9D015BF; Wed, 22 May 2019 06:25:48 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 742E23F575; Wed, 22 May 2019 06:25:44 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com Cc: aou@eecs.berkeley.edu, arnd@arndb.de, bp@alien8.de, catalin.marinas@arm.com, davem@davemloft.net, fenghua.yu@intel.com, heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, ink@jurassic.park.msu.ru, jhogan@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, mattst88@gmail.com, mingo@kernel.org, mpe@ellerman.id.au, palmer@sifive.com, paul.burton@mips.com, paulus@samba.org, ralf@linux-mips.org, rth@twiddle.net, stable@vger.kernel.org, tglx@linutronix.de, tony.luck@intel.com, vgupta@synopsys.com Subject: [PATCH 18/18] locking/atomic: s390/pci: remove redundant casts Date: Wed, 22 May 2019 14:22:50 +0100 Message-Id: <20190522132250.26499-19-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190522132250.26499-1-mark.rutland@arm.com> References: <20190522132250.26499-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that atomic64_read() returns s64 consistently, we don't need to explicitly cast its return value. Drop the redundant casts. Signed-off-by: Mark Rutland Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Will Deacon --- arch/s390/pci/pci_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/arch/s390/pci/pci_debug.c b/arch/s390/pci/pci_debug.c index 45eccf79e990..3408c0df3ebf 100644 --- a/arch/s390/pci/pci_debug.c +++ b/arch/s390/pci/pci_debug.c @@ -75,7 +75,7 @@ static void pci_sw_counter_show(struct seq_file *m) for (i = 0; i < ARRAY_SIZE(pci_sw_names); i++, counter++) seq_printf(m, "%26s:\t%llu\n", pci_sw_names[i], - (s64)atomic64_read(counter)); + atomic64_read(counter)); } static int pci_perf_show(struct seq_file *m, void *v)