Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1952753rwd; Thu, 25 May 2023 22:33:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68qqjQSet7v0unRdHFElc0ho5JJsHxnJdN8Zp7BtVY1ptbm/ToKh0kFxdT2JvOB8r9bwqM X-Received: by 2002:a05:6a20:e60c:b0:106:c9b7:c932 with SMTP id my12-20020a056a20e60c00b00106c9b7c932mr857999pzb.1.1685079184324; Thu, 25 May 2023 22:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685079184; cv=none; d=google.com; s=arc-20160816; b=UWt3r8BEmc+l82W2aEkulGjKQeZs3CzfK2rk9whGqMkEi5e2Y9QnUpPpEHI0/r5ZKY 3mGIK4fQGI4C6FM2ruZxdwK9km6fUrKiyZDizSOnRIZjgtT4g3Yp/QKGq0mB+ubAdmV6 9J+/TsKQudi6tog31hVWWcZIk/wBoXYAyEC2cIA6VOAqMWLMQlX0fIudIg/MIi2P43ds jgfuSEsPME5SjFxI8MBpuBBn7KtVQk9nJ1LHjjhWPuhZrYrh4L/m9oxON+Q5CkOwrSH8 q2UJZSnp5sg44D1iNkOuKoBb7vDU10qUw8fJtgcXNu3H2E8TqTP9SG/4DI/YLjjYwvm3 L8XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=movR2kgaqhuJ0kfo+Y7vgQbU8GIGLJXozmT4bEwaGeU=; b=agiibKAVzPu2qfc485p9adNIv++bDN/rXpTN2jIDuX4MYbaYRmZr1kxbr5c/OC6Wej pByTrB4qPFFCZPodVR0t5EX5zhfOe1siqSChsbyH1n4P6mTCP6HfQ/Xobto0zqkzK2pb 9rhqJZjdfHnzL/WIqfY+yhk0pGXrbsEY4qxayks9wvrv3gPSVMdTB0YOPiR7GsuKFwxv VPmKLewsDKpAKzpTuZ4FQTXejwp261spmkUNjYQNZAoDZWJILnV1biBr0HmTNkvyhAWZ J+yZZSGI88PwRNyESXMTFTE/lEzneGnWD+m3wQlvQ5ndthGLUVOIdyvS5KBzzfLaqGuI Qc/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=w5z2ShyZ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a637e16000000b0053b29394937si3021528pgc.816.2023.05.25.22.32.48; Thu, 25 May 2023 22:33:04 -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=@infradead.org header.s=bombadil.20210309 header.b=w5z2ShyZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236388AbjEZEvo (ORCPT + 99 others); Fri, 26 May 2023 00:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjEZEvn (ORCPT ); Fri, 26 May 2023 00:51:43 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05651119; Thu, 25 May 2023 21:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=movR2kgaqhuJ0kfo+Y7vgQbU8GIGLJXozmT4bEwaGeU=; b=w5z2ShyZWO3yUGUdUK+xJe80v+ 7mch2mHhZtYK6vWzLRnG9KczU7EbFNKu2GJu4P3uLK3znFuByYuwKN6o3ajPVUeVYAt/GyBmSgyxd U3jfdJfQAhBIt1q9z77QArvay08XGBovrGU+ws4GnyjOyfnt5tKme6eiBRi35wOv4L8nF1ixdGcs4 T5amoGvYHythK8KxLzBbxd+zvIJtiBjzQ+8d5W7MM3TELcqrHFTNnG1mN4E/4hfvJEw3hYkPYcdRP DL58OIxsPfXlhwkJ+0kIVftMLplJHAL4PA4uL8wUWdTb7vLTzvVUvXt0FUZpWlHi0Ya/doWAbNk/p Gni4NbEA==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q2PQQ-0011Tf-23; Fri, 26 May 2023 04:51:38 +0000 Message-ID: Date: Thu, 25 May 2023 21:51:37 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 24/26] locking/atomic: scripts: generate kerneldoc comments Content-Language: en-US To: Akira Yokosawa , Peter Zijlstra Cc: Mark Rutland , linux-kernel@vger.kernel.org, boqun.feng@gmail.com, corbet@lwn.net, keescook@chromium.org, linux-arch@vger.kernel.org, linux@armlinux.org.uk, linux-doc@vger.kernel.org, paulmck@kernel.org, sstabellini@kernel.org, will@kernel.org References: <20230522122429.1915021-1-mark.rutland@arm.com> <20230522122429.1915021-25-mark.rutland@arm.com> <96d6930b-78b1-4b4c-63e3-c385a764d6e3@gmail.com> <20230524141152.GL4253@hirez.programming.kicks-ass.net> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 Hi Akira, On 5/25/23 20:17, Akira Yokosawa wrote: > On Wed, 24 May 2023 16:11:52 +0200, Peter Zijlstra wrote: >> On Wed, May 24, 2023 at 11:03:58PM +0900, Akira Yokosawa wrote: >> >>>> * All ops are described as an expression using their usual C operator. >>>> For example: >>>> >>>> andnot: "Atomically updates @v to (@v & ~@i)" >>> >>> The kernel-doc script converts "~@i" into reST source of "~**i**", >>> where the emphasis of i is not recognized by Sphinx. >>> >>> For the "@" to work as expected, please say "~(@i)" or "~ @i". >>> My preference is the former. >> >> And here we start :-/ making the actual comment less readable because >> retarded tooling. >> >>>> inc: "Atomically updates @v to (@v + 1)" >>>> >>>> Which may be clearer to non-naative English speakers, and allows all >>> non-native >>> >>>> the operations to be described in the same style. >>>> >>>> * All conditional ops have their condition described as an expression >>>> using the usual C operators. For example: >>>> >>>> add_unless: "If (@v != @u), atomically updates @v to (@v + @i)" >>>> cmpxchg: "If (@v == @old), atomically updates @v to @new" >>>> >>>> Which may be clearer to non-naative English speakers, and allows all >>> >>> Ditto. >> >> How about we just keep it as is, and all the rst and html weenies learn >> to use a text editor to read code comments? > > :-) :-) :-) > > It turns out that kernel-doc is aware of !@var [1]. > Similar tricks can be added for ~@var. > So let's keep it as is! > > I'll ask documentation forks for updating kernel-doc when this change > is merged eventually. What do you mean by that? What needs to be updated and how? > [1]: ee2aa7590398 ("scripts: kernel-doc: accept negation like !@var") thanks. -- ~Randy