From patchwork Tue Jun 6 08:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 103653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3246687vqr; Tue, 6 Jun 2023 01:57:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56w5UYkP8XtGxsz1QWrA39xzGvQtofBMy0v4uKa17jcXU9S33c831rg+fdnnq5lpb2JaQw X-Received: by 2002:a92:d0c3:0:b0:33a:56d6:d9a4 with SMTP id y3-20020a92d0c3000000b0033a56d6d9a4mr2521292ila.10.1686041863056; Tue, 06 Jun 2023 01:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686041863; cv=none; d=google.com; s=arc-20160816; b=lw2UxSwdAlDRoqHd026rsiWQppvXcT3FKuIFVmbv6XKNnqxQGi4TZXdpKPRjsrQ8ok xt7UJZ1r1UAfol/BWvmmNomuwr7PBdk/BBlhuJQzix1N8+hiESmfL14dOg9ez6R6nsa7 I2RvDm9oSzCKx15DqDftpz53E1zqQAx7ScuOcuV6zurqWzSoRfZAG+ecG2olzE3GA6Ml KkMxWVYA2DpskZw1Od9hgcxKIQ31NDgT7gBrrZldBOahG1tgGN7AMN9/RtAMDYepvEqA RAbWwuNjvG6Db+6OD0/I/gZ39YoA63rC96h7jtXF1Bzh4tE69WdrNR/2mQbVRx92enN4 +6mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ylXdZdeJh1jMS44nXMCBDkzT6yWm/qULQ8KWTKZtFiE=; b=s3jHmpmI7CJ8JRFs0hqQjVcJzYG4t9IcpUeDw7DzcfdqoER00i9Sd8tQ8St7mBcWtq Fb/tTX6n0r3mGLCJYAde2eWEFNViNC3egbeex/zORQbJQXlhzem3eJeCvQ7lx27+td2t 6shoPsBzo7UOad9EmE0LuX6+Nq4JBCzth5vSmD61fvpAX/HUsMctldYv5Y1NzDHmxXcY Gseye0xnRimQ0wcoVsB5cAYhFI1rBefb4n6GLdzVeWZnSdPTfD8BBQFwc5wdSW7AMgDm vGmG/gONCuzcwin3Q7GCzlhJjgWliOdDpPzGd5qfo3kqgocIz3v01OHqCAWKR941Hi+h yLWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tlWgPT39; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=F8QcZ7p7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a656687000000b00540ca2b00c6si7112010pgw.733.2023.06.06.01.57.30; Tue, 06 Jun 2023 01:57:43 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tlWgPT39; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=F8QcZ7p7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236671AbjFFI0X (ORCPT + 99 others); Tue, 6 Jun 2023 04:26:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236625AbjFFI0T (ORCPT ); Tue, 6 Jun 2023 04:26:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2E4D196; Tue, 6 Jun 2023 01:26:18 -0700 (PDT) Date: Tue, 06 Jun 2023 08:26:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686039977; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylXdZdeJh1jMS44nXMCBDkzT6yWm/qULQ8KWTKZtFiE=; b=tlWgPT39qY33CvE7vkuaEbjvmT1X7cbS4/E357ifiKThMsM7lL3k9697hHq3PYyqdIdo0v mnkHGpmQhsPQtw+qu2dUFyWjGdqZlD+gwBAGZsq0SAvO7vD66Zrax6iESqYUSfnutI3Bmi VzcvgKhNc8JhWzilnxLJrZuXiWXz80CRvazGrWx/+avFaItr39HhyOapdl5kjsulcGe+aw zV2bfOlADPLDw7eIr1gZAY8/MY/78ZEhQAvHhjshBDFN2k8ms3vsa2XTm+eDvXaUUuQV8p 6h06ZT1KRIZRMk/Z8n9cO/+KikS6trAVkPNV0cmgoGE61ZXVqwn5BpkVlsLMjw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686039977; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylXdZdeJh1jMS44nXMCBDkzT6yWm/qULQ8KWTKZtFiE=; b=F8QcZ7p7mGvFFFzhxmnuDJNr+661cXGkyoGHyz47cB8j0+AgO3ao9KVBuVqY9KNJwSFKhB +tAOiIsn3GC/KxAw== From: "tip-bot2 for Mark Rutland" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] docs: scripts: kernel-doc: accept bitwise negation like ~@var Cc: Akira Yokosawa , Mark Rutland , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230605070124.3741859-25-mark.rutland@arm.com> References: <20230605070124.3741859-25-mark.rutland@arm.com> MIME-Version: 1.0 Message-ID: <168603997691.404.11912454815331454382.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1767845724808684027?= X-GMAIL-MSGID: =?utf-8?q?1767943032398458955?= The following commit has been merged into the locking/core branch of tip: Commit-ID: 8aaf297a0dd66d4fac215af24ece8dea091079bc Gitweb: https://git.kernel.org/tip/8aaf297a0dd66d4fac215af24ece8dea091079bc Author: Mark Rutland AuthorDate: Mon, 05 Jun 2023 08:01:21 +01:00 Committer: Peter Zijlstra CommitterDate: Mon, 05 Jun 2023 09:57:23 +02:00 docs: scripts: kernel-doc: accept bitwise negation like ~@var In some cases we'd like to indicate the bitwise negation of a parameter, e.g. ~@var This will be helpful for describing the atomic andnot operations, where we'd like to write comments of the form: Atomically updates @v to (@v & ~@i) Which kernel-doc currently transforms to: Atomically updates **v** to (**v** & ~**i**) Rather than the preferable form: Atomically updates **v** to (**v** & **~i**) This is similar to what we did for '!@var' in commit: ee2aa7590398 ("scripts: kernel-doc: accept negation like !@var") This patch follows the same pattern that commit used to permit a '!' prefix on a param ref, allowing a '~' prefix on a param ref, cuasing kernel-doc to generate the preferred form above. Suggested-by: Akira Yokosawa Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230605070124.3741859-25-mark.rutland@arm.com --- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 2486689..eb70c1f 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -64,7 +64,7 @@ my $type_constant = '\b``([^\`]+)``\b'; my $type_constant2 = '\%([-_\w]+)'; my $type_func = '(\w+)\(\)'; my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; -my $type_param_ref = '([\!]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; +my $type_param_ref = '([\!~]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params my $type_fp_param2 = '\@(\w+->\S+)\(\)'; # Special RST handling for structs with func ptr params my $type_env = '(\$\w+)';