From nobody Sun Feb 8 19:43:48 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2729EC7EE24 for ; Tue, 6 Jun 2023 08:26:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236710AbjFFI0Y (ORCPT ); Tue, 6 Jun 2023 04:26:24 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the locking/core branch of tip: Commit-ID: 8aaf297a0dd66d4fac215af24ece8dea091079bc Gitweb: https://git.kernel.org/tip/8aaf297a0dd66d4fac215af24ece8dea0= 91079bc 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 =3D '\b``([^\`]+)``\b'; my $type_constant2 =3D '\%([-_\w]+)'; my $type_func =3D '(\w+)\(\)'; my $type_param =3D '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; -my $type_param_ref =3D '([\!]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; +my $type_param_ref =3D '([\!~]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; my $type_fp_param =3D '\@(\w+)\(\)'; # Special RST handling for func ptr = params my $type_fp_param2 =3D '\@(\w+->\S+)\(\)'; # Special RST handling for str= ucts with func ptr params my $type_env =3D '(\$\w+)';