Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp788582pxf; Thu, 25 Mar 2021 14:08:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbZ+Qw2HU8o+OfvkNAcn/7n21VSX4+fSPQKdhTQ4JLEk5SDrlvWjKeihRhEFae8RGTeZqq X-Received: by 2002:a50:ed96:: with SMTP id h22mr11132826edr.39.1616706507212; Thu, 25 Mar 2021 14:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616706507; cv=none; d=google.com; s=arc-20160816; b=BJ/MQH5JVPoK4OBjmAGc5I4yqvdrfg2ygKVt5E7uCA6J7SO20j+K9EmSi/D2A5OOYq bFvLb0B8pNKV3k9dLkIxCfbE7w0YZ3/dDP+eI35zBzUt33CUCb2mDFeC0mKtmRxUly1s MwG3I+4NBXssofkj+0Gfuv+uH1xNUI6a8p0dt8II3xRoRYo85/mzBcl+qt3wXJgHS+vF WTjAggce+/n2VsHM4Z+UHQv7c9cyD65dikAFF/CnCl54XSlc22Uspv7uFDlZtqnRQgcG GP3AmX63ZcxcfNZesGT0JrFKmapI3UCQWpQ7kWlH0+WbLQkMb7tV3EbwNS8k9npaMJZk hsqw== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature:dkim-filter; bh=iGv+gy+JQHLdwSA/W99xdBIG7NrXqMxzGHgpi0V8xoI=; b=V8I5JWR4xZRxOtOKczJEWbAHAOAsXejp4WWjk10528ft0daaUsIKdzfycDM3s5kWUD uUbkOiUe/N6d6FXWTd4p5673sNl3t83n2DdpycPUEJfvhA5SC5O3VVi06VeAiBVm4Fb4 NIpP4nZ0PDq8ksp/u6Z3GxHjrkHmmfSRjNdDsBSXDkKsEk+UrnnDCV6q+7t0tkPLnuRl 7wvv7wFiI3MQObHvBJL7wrX8aQPEsJvQKttvq7wv47JsQ/kQUvgRNw2BjjPgbMvBFuxY Vf5QvaNj2nXgQWII4NfCHoYh8H8MMvVYgwlGWTRglngmaWtPn8fHCoWLrgkgD2o0sxrI EeRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=C2xRhDoz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id si28si5221926ejb.106.2021.03.25.14.08.04; Thu, 25 Mar 2021 14:08:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=C2xRhDoz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbhCYVE3 (ORCPT + 99 others); Thu, 25 Mar 2021 17:04:29 -0400 Received: from ms.lwn.net ([45.79.88.28]:52272 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhCYVEB (ORCPT ); Thu, 25 Mar 2021 17:04:01 -0400 Received: from localhost (unknown [IPv6:2601:281:8300:104d::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id B9C0D6A2; Thu, 25 Mar 2021 21:04:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net B9C0D6A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1616706240; bh=iGv+gy+JQHLdwSA/W99xdBIG7NrXqMxzGHgpi0V8xoI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=C2xRhDozwuE/9W4G+Ys47QGMv+I4fWco5t/ATvwMaMp4ix+LysEWb+VLxr+jQ7lMv f9QiKith1pPeLUTKEiZDcAszuJV11zNlxQtrDXSMfA7JPW3m44yjjb3xpdjZdTz9VC 6sTaZcPb/yOVcNi556/Z60567clHenopFODJDolSaGdR+9v17HmLmST339GkCb8wG3 U/luDihWgnJ05H4nyv+3zpLBylgglsljr0OxoOsSWBnTPEZ19wXr1JTSv8GMvZwW9m PR5G/J6IghVOv46bZY77djDJFGNH8s6c7D7v1wE7Z0evThFHYLMUcaWxFclyER8R/7 EW3RkOa5dxU2Q== From: Jonathan Corbet To: Matthew Wilcox Cc: Mauro Carvalho Chehab , Linux Doc Mailing List , Rob Herring , linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel-doc: better handle '::' sequences In-Reply-To: <20210325191435.GZ1719932@casper.infradead.org> References: <20210325184615.08526aed@coco.lan> <2cf44cf1fa42588632735d4fbc8e84304bdc235f.1616696051.git.mchehab+huawei@kernel.org> <87tuozyslu.fsf@meer.lwn.net> <20210325191435.GZ1719932@casper.infradead.org> Date: Thu, 25 Mar 2021 15:04:00 -0600 Message-ID: <87a6qrx7wf.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox writes: > On Thu, Mar 25, 2021 at 12:51:25PM -0600, Jonathan Corbet wrote: >> Mauro Carvalho Chehab writes: >>=20 >> > Right now, if one of the following headers end with a '::', the >> > kernel-doc script will do the wrong thing: >> > >> > description|context|returns?|notes?|examples? >> > >> > The real issue is with examples, as people could try to write >> > something like: >> > >> > example:: >> > >> > /* Some C code */ >> > >> > and this won't be properly evaluated. So, improve the regex >> > to not catch '\w+::' regex for the above identifiers. >> > >> > Signed-off-by: Mauro Carvalho Chehab >> > --- >> > scripts/kernel-doc | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> Ah....wouldn't it be nice if kerneldoc comments had just been RST from >> the beginning? I don't think we're fixing that at this point, though, >> so this makes sense; applied. > > Well ... > > If somebody wants to write a new tool (*) that extracts documentation > written in a different format, I think that could be done. Because the > hard part of writing documentation is getting the person who knows the > code to get everything that's in their brain into words, not really > the formatting. > > If somebody did want to write such a tool, I think we'd also want a > tool that turns the existing kernel-doc into the new format, because > maintaining two function-doc formats would be awful. Yeah, the thing is that, as long as we're documenting code with something other than RST, we *do* have two formats, and they interact with each other in surprising and unwelcome ways. I don't really see a fix, though. Even if we come up with the Perfect New Format=E2=84=A2, I don't want to be the one trying to push through the patches changing tens of thousands of kerneldoc comments over... jon