Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1841434lqz; Mon, 1 Apr 2024 21:27:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqHYzLwyVV6PDtJCewQ6/xWsqVNpEeu8BEoCJ/w5LCAWSI3vkgyC9CMDPK/fCJAwJDkH6uYrc+cbWiN/n/T+zLTLY9PQhsBWvqUvPkpw== X-Google-Smtp-Source: AGHT+IFcDBOFQSZWbOh9w7VOV/Py0V9B5/ngRedF94I5ErvlXRNqLEw+4wr8awq/SUZlDREo/EFw X-Received: by 2002:a17:903:247:b0:1e0:36e:2bb9 with SMTP id j7-20020a170903024700b001e0036e2bb9mr16498353plh.11.1712032035351; Mon, 01 Apr 2024 21:27:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712032035; cv=pass; d=google.com; s=arc-20160816; b=coo8a3X8+r8t6Nv2k9QAy0ToNBTcKFUcyKLi4L5DAHL1bvbTrPVKx3VzLNPiVauMUD ZpnLWHNa4ATjLYiec77Hv7VBj1cN+3NsGgdFNg1nXJ9aDpNEB/BBOrnSpNVhPdUkOy0L zMSE4telpmLqKZ5NgH76dUFlkjiygpQgHylyCQglh4FVG62ZU/OJ0Nph/8UYiIQVBsfV i4ZTgwgilx+UvWS8b6EGUr64yC4rZd8z28vscSTUPZbSwSequ8Qunf2EwnWbhCo2qiFo XNUCTU1ab3AR/yv623vHxcXkQtCd3VmzTdUagKj0KIChDnUldYHeJuODHxfv7Ya21fr5 iVzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=RsQniokm8qTtlU2scD+CuQROlx13zFTEsVpFGyTzeI0=; fh=5XKO4FJFa744F7hHLL6pG6MPZgtIgKlwP2n1WruVqgQ=; b=Ua4Js//zH0h7Chv3AG6Q93sliyiqL9IYMAtsuHABIipBr7IuH9oLtPsyn4dGCSvo40 VO22p+T4ZHs5cBqFBR96BxPVYdPb76AU4YDU1t2nDBuTtmmYqxr6t0lXN+INfBx+htV9 tnwfWjR2JobcjOIK8txcYIe/LJ9jNtKPdQPVFvUv9lzcyIsnra045fmRyQfWfh4J3l/R tvkb/pBB0i/xZcdc5sSWbxtHD8nUjeJhXL+etdFzjphi8HyPC4A36qLNlnCO9zghKvFP 79xvE7lVYOw7y9xwN0wZkEpCrzqrhPCdSnoKKPglFo+x9nN0jIT+2iFQz2JpW/hzg81F 0D1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-127372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k1-20020a170902694100b001dd693cc79csi10058724plt.620.2024.04.01.21.27.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 21:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-127372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D9AD282CF1 for ; Tue, 2 Apr 2024 04:27:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B23C317BAA; Tue, 2 Apr 2024 04:27:10 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E167179AA for ; Tue, 2 Apr 2024 04:27:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712032030; cv=none; b=i31Py/wVaOSsiZjB1ijDzx9zNzT8I40WU/SwcHZ4vMqZIPZhu/1InPPum5t8jAWkElqMIqtbb3/4NHt3ncaW4oic/ciHMZlT042GbAPSSzb1I98Uwwizwi0wSVRmGuzUODPBM8gO4EY4s9/wUhDMkgMln7R2gBfuN8WeLhn4dY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712032030; c=relaxed/simple; bh=nx3dhcwM3R76N0K2GnBM5xafccj0snz2GGo65nje9Ow=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cf8VmULfOiYvdaqk6Mld092a2iM7dDrtNLzyOfCh1Tx/NGJ8U8hJlHOXJod9VU3Mtb9SraHk/R85Sq9TOMqEvtnfHvkmgAvR7GIfuxnswPUOJ6y5Ee1aahA9I9OitUm2MoY3LTGh3GjohMUIINIdq2Gd1KSYsz1x7G42NIo76H0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11BC3C43390; Tue, 2 Apr 2024 04:27:08 +0000 (UTC) From: Al Viro To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, "David S. Miller" , Andreas Larsson , Palmer Dabbelt , Arnd Bergmann , Marco Elver Subject: [PATCH 1/8] sparc32: make __cmpxchg_u32() return u32 Date: Tue, 2 Apr 2024 00:28:28 -0400 Message-Id: <20240402042835.11815-1-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240402041138.GF538574@ZenIV> References: <20240402041138.GF538574@ZenIV> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Conversion between u32 and unsigned long is tautological there, and the only use of return value is to return it from __cmpxchg() (which return unsigned long). Signed-off-by: Al Viro --- arch/sparc/include/asm/cmpxchg_32.h | 2 +- arch/sparc/lib/atomic32.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/include/asm/cmpxchg_32.h b/arch/sparc/include/asm/cmpxchg_32.h index d0af82c240b7..112bfaa28729 100644 --- a/arch/sparc/include/asm/cmpxchg_32.h +++ b/arch/sparc/include/asm/cmpxchg_32.h @@ -39,7 +39,7 @@ static __always_inline unsigned long __arch_xchg(unsigned long x, __volatile__ v /* bug catcher for when unsupported size is used - won't link */ void __cmpxchg_called_with_bad_pointer(void); /* we only need to support cmpxchg of a u32 on sparc */ -unsigned long __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_); +u32 __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_); /* don't worry...optimizer will get rid of most of this */ static inline unsigned long diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index cf80d1ae352b..d90d756123d8 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c @@ -159,7 +159,7 @@ unsigned long sp32___change_bit(unsigned long *addr, unsigned long mask) } EXPORT_SYMBOL(sp32___change_bit); -unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) +u32 __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) { unsigned long flags; u32 prev; @@ -169,7 +169,7 @@ unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) *ptr = new; spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); - return (unsigned long)prev; + return prev; } EXPORT_SYMBOL(__cmpxchg_u32); -- 2.39.2