From patchwork Mon May 22 12:24:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 97400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1412073vqo; Mon, 22 May 2023 05:32:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MOAO+uqyr+5euws53BDbMmt32vvGNSGkvboAdthTaGQHZIMAnM8vCgNw16i2p/5+vwwdm X-Received: by 2002:a17:90a:d513:b0:24d:d377:d1 with SMTP id t19-20020a17090ad51300b0024dd37700d1mr10426247pju.45.1684758735327; Mon, 22 May 2023 05:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684758735; cv=none; d=google.com; s=arc-20160816; b=cuUZEzXB4uqTfIxFFXbxsdFOhzQZeNiIdlnDPOr7+2Jzs5bsQdnoaViFQxHnrBbkNb iVZKqUfitR1yiavwfEP/xOmPVCWbmu26rngVDEgOjq7p/cZO9msarC4Ctq97waAMafRf 6etOcE3B9VrkHaD6bRWmNd9nsUeWQYVSHf3IENi3AkLwzxnMfRJA+c8quaWEVAXD0hda O3dBYDba2t+EGHjP9WcmAPo8B6t6W3qNcCS1CfAgI7RSQsXeYUq6WZAXoZO4obIoRgV5 QOYq4d+dnPLIowhk8ffoiHEv3xgh7J3CIJvEwFrEWpIsyvudG6Bt2hbQcVt3ufiJKEtz jdQA== 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=2mBtWn9XFegQnu5QeNphAP8sNYcnImakWEuY0JpHT4A=; b=f5Y6bwUldpymcP92x1njyNAtZmC8fIYpefxvDW38tDrBkNL9Bl+FOvFFBEqUBIev+Z uDnSqF4UsPQaodsnJxjFtMg5TBpLK7i1mm+ZcXb3Wmv9EEnpRl7P56WOlvtMsT798IL2 rR2HX+Hrsa6iOpWCW4Oh0qfI8gZN/RwUdgTkfxyQRWzHpPYa19co8SC7cEPVAjuL+Pai Puno2KdqtwE1VjFTCglfqAHHNtzTRbsdUyTwtaPF+YSQSVa33opZ15U2EIF0DWLiGlCu 3Cm+ubRkd5hThl2A10wyHj0bjOgAajFRnPGPUji8n0Wx+tNC6hpHmroekX1174gSxLx7 IdKw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a17090ad48200b002537bd7454dsi4540943pju.101.2023.05.22.05.32.03; Mon, 22 May 2023 05:32:15 -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 S233849AbjEVM2z (ORCPT + 99 others); Mon, 22 May 2023 08:28:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbjEVM13 (ORCPT ); Mon, 22 May 2023 08:27:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E410D1FE2; Mon, 22 May 2023 05:25: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 ADBC1139F; Mon, 22 May 2023 05:26: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 0F7F23F59C; Mon, 22 May 2023 05:25: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-arch@vger.kernel.org, linux@armlinux.org.uk, linux-doc@vger.kernel.org, mark.rutland@arm.com, paulmck@kernel.org, peterz@infradead.org, sstabellini@kernel.org, will@kernel.org Subject: [PATCH 21/26] locking/atomic: scripts: split pfx/name/sfx/order Date: Mon, 22 May 2023 13:24:24 +0100 Message-Id: <20230522122429.1915021-22-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230522122429.1915021-1-mark.rutland@arm.com> References: <20230522122429.1915021-1-mark.rutland@arm.com> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766597575468436423?= X-GMAIL-MSGID: =?utf-8?q?1766597575468436423?= 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 Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Paul E. McKenney --- 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 <