From mboxrd@z Thu Jan 1 00:00:00 1970 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 63A86C77B7A for ; Fri, 26 May 2023 04:51:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234250AbjEZEvo (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-doc@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