From patchwork Mon Jun 5 07:01:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 103114 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2500639vqr; Mon, 5 Jun 2023 00:10:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73Jsx5ftyl4bAutbD8iqhDuSXgNICl5kFbCCiTDe7V8A05A3UP4IXvJVj3/enjs+bLhvPx X-Received: by 2002:aca:2218:0:b0:39a:bbd5:c0b7 with SMTP id b24-20020aca2218000000b0039abbd5c0b7mr855254oic.53.1685949059610; Mon, 05 Jun 2023 00:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685949059; cv=none; d=google.com; s=arc-20160816; b=lCfLcSrmm5UypUyf7AXVvrnYv/d1dNV0RbTK9bI2VA9bsjPe4etkyvbn9lbAz2N1QN 2UDAZH8h73jBx1GndpNYKbYObWLgNZt8Zw13IwcY6Xz5iGgjA4B+skTo315977fioyFn MaNzPf0BbZoDy7R93aIYwSzzWuRsRjeVdheIoPv9vWoKydLOznlerTv3+EsWpseGHmgG wlD3bo6sMHndE30WV5P6/Mp2uVsdNfjTqGTn4ESwDmlyD36p9oCIyEN1ZIwOuWD7LwfL Kpqn3nKJhFoPTjUM4eFx3oi71PlXqXKkAzE+WRUK0EuQIVUExh5b6qHGOUHRlqhIZPre 0oyA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a63754d000000b0053fb1a1218fsi5086598pgn.817.2023.06.05.00.10.46; Mon, 05 Jun 2023 00:10:59 -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 S230471AbjFEHDr (ORCPT + 99 others); Mon, 5 Jun 2023 03:03:47 -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 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?1767845721068777025?= X-GMAIL-MSGID: =?utf-8?q?1767845721068777025?= 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 <