Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5247682rwd; Mon, 5 Jun 2023 00:11:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lUqGtnK7nG5gfx83L/ja2kIx9t/OVa9a4w5VG93Uw8RJ8bIZS27jyYXXDr8qB0fPTA8/a X-Received: by 2002:a05:6a20:4308:b0:100:efa1:eab0 with SMTP id h8-20020a056a20430800b00100efa1eab0mr3411938pzk.2.1685949064013; Mon, 05 Jun 2023 00:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685949063; cv=none; d=google.com; s=arc-20160816; b=g1gLRzAo1lyPItTTeux51qMOhYxQJc2BvICY8idyDvijpQHb4B4ALE9PFGPczozKkU 8GB1hoDMD9pw/+02kBWE54beuyWlelvRLNfIaLv9vNzXnE7UqfZn9Ehw91JCEM2WmXXw 2Stf47cngniUkeU8KP9IWqr2PEur5hRo+15t1yy9/nzI4nkcEK2bUR7EYTkHvcF8srql cIeChn0qr/gzBXAxsd9b3lHwMhBT1C+IEJXiUGvWqAt14UdyhQaeBeEMsEahZPhZ+Blv OVhzixWrij+3dYPQbYY9upzy45XjStFeQovR3R8O4gciHso4HGCmHuTo+oeA5/FcWfWh iWEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MrNmIfp3v3SDidcpFCMSuMXN4YwJK8PgUaQackrFfmk=; b=SDHkgRKztB5j2UYaJK8FyRHYqbuJyjmVptyMhJOXvyyPeaSWz7uYJlHzLsA/Wc2TW3 gut8fe4zZq7lUE/dZ4ulWRLfAdamfaEbAvKDdtipUZP2E7ZupX74UrhbAcn3od2uwpl5 8iYYORCKYeH0SbvGSgkyULG4jUxaTaT5C5DvmI/QR+bq2rSDVMU/aIShQSKitbyYaHwL MCHHOgHRfJkOdVawdFj5PMmh5VjfblCWksqtOXMuWz6d0+N05ucU1VVd/ee7RQeooiao 8hscoyvw7U/3l8FCBTxiFzheKHtI9N1ZXnaPsMJUWySu2f2V9BGEZqiWI+6F3M1KkjPG g85w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a6566c6000000b0053fa62fc004si5117907pgw.33.2023.06.05.00.10.51; Mon, 05 Jun 2023 00:11:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbjFEHDq (ORCPT + 99 others); Mon, 5 Jun 2023 03:03:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230318AbjFEHDJ (ORCPT ); Mon, 5 Jun 2023 03:03:09 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 815F81B6; Mon, 5 Jun 2023 00:02:29 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E7C431650; Mon, 5 Jun 2023 00:03:14 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A2C1B3F793; Mon, 5 Jun 2023 00:02:27 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: akiyks@gmail.com, boqun.feng@gmail.com, corbet@lwn.net, keescook@chromium.org, linux@armlinux.org.uk, linux-doc@vger.kernel.org, mark.rutland@arm.com, mchehab@kernel.org, paulmck@kernel.org, peterz@infradead.org, rdunlap@infradead.org, sstabellini@kernel.org, will@kernel.org Subject: [PATCH v2 21/27] locking/atomic: scripts: split pfx/name/sfx/order Date: Mon, 5 Jun 2023 08:01:18 +0100 Message-Id: <20230605070124.3741859-22-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230605070124.3741859-1-mark.rutland@arm.com> References: <20230605070124.3741859-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently gen-atomic-long.sh's gen_proto_order_variant() function combines the pfx/name/sfx/order variables immediately, unlike other functions in gen-atomic-*.sh. This is fine today, but subsequent patches will require the individual individual pfx/name/sfx/order variables within gen-atomic-long.sh's gen_proto_order_variant() function. In preparation for this, split the variables in the style of other gen-atomic-*.sh scripts. This results in no change to the generated headers, so there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Kees Cook Cc: Boqun Feng Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Will Deacon --- scripts/atomic/gen-atomic-long.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/atomic/gen-atomic-long.sh b/scripts/atomic/gen-atomic-long.sh index 75e91d6da30d3..13832171f7219 100755 --- a/scripts/atomic/gen-atomic-long.sh +++ b/scripts/atomic/gen-atomic-long.sh @@ -36,10 +36,15 @@ gen_args_cast() gen_proto_order_variant() { local meta="$1"; shift - local name="$1$2$3$4"; shift; shift; shift; shift + local pfx="$1"; shift + local name="$1"; shift + local sfx="$1"; shift + local order="$1"; shift local atomic="$1"; shift local int="$1"; shift + local atomicname="${pfx}${name}${sfx}${order}" + local ret="$(gen_ret_type "${meta}" "long")" local params="$(gen_params "long" "atomic_long" "$@")" local argscast="$(gen_args_cast "${int}" "${atomic}" "$@")" @@ -47,9 +52,9 @@ gen_proto_order_variant() cat <