Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1065677pxk; Thu, 1 Oct 2020 23:24:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuq3OfVKQLR9bwMwQ3KAZjcsg5inZ2euRWeqOI3M1zqeenx+VeRXS0bcxPiXUngAtNyI70 X-Received: by 2002:a50:ee15:: with SMTP id g21mr703350eds.47.1601619857014; Thu, 01 Oct 2020 23:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601619857; cv=none; d=google.com; s=arc-20160816; b=MtG3eCCkticbVKXug7BZSbmGqBW6ZRG5SvBRfDKswPsRKT/5BlGsTUyPTWkqJbspsU palGfBiMnuEQBsRbjTlJVRP8qQCAFzStrz3Q57ggcrEdhe4cidDFzuhOGm0cMmeq1Tli gB3azCM1AakGNj46HijIawfSKkpKjXTqXxrGMHXJzFMtGzk1NX8lLZs8WoXhC7jbOvg6 N9NxDm4Ydah97UuzrOHnZfZOgqaiT7anFQWdpxgLrbtJQ8FPuAlkrNdwZ3TJEcs95jIY 78RKwDjmB/vfskmqDO+gFKGxcmu2PIX4tpkYI72ong/bJVJ+O+PFi9JXeczUDBqBP49O qIDA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eKIvNLycaXa2PcjEywvhBmm4oyGDZ793/u5DAqlmZBg=; b=I6q0B/OI/+8UlpPnKthqlgDSmWXsNavtJ+YhOPm55rnYMZn7Ga3BzZufMwx0ukwkwM 6/imU4/czac+5Lpvz6UACuD3gy3WJvx6NqveEC599XHFAfD+YA9KzQakEDqB4Gr3zFaZ tuN//GE+0mUDBKFhLjxY3N551op45Z09mTnrpN4NzI/UmSYPCqyq0rdyw7j4gSmddvc/ hhehiIV1BqtX9Ba6sgrdBz3fhliswrpmTfOTX6dpn9Al49ZcxWfdyvjSs6TMbD7ziuCi PatWHk/y7w9VLUxPyR7s4X81cG3WW0GSkSj1Et8HhsDn4Sad9tFjiH1tC15XcCpYxNDU aclg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DG1CqBpf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si430740edv.195.2020.10.01.23.23.53; Thu, 01 Oct 2020 23:24:17 -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=@kernel.org header.s=default header.b=DG1CqBpf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726051AbgJBGW1 (ORCPT + 99 others); Fri, 2 Oct 2020 02:22:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:39442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbgJBGWZ (ORCPT ); Fri, 2 Oct 2020 02:22:25 -0400 Received: from coco.lan (ip5f5ad59f.dynamic.kabel-deutschland.de [95.90.213.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86FCC206DD; Fri, 2 Oct 2020 06:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601619745; bh=Fm3wF63UnVpjp+czzLRNKA2N8EiUUiZinULEHueyAbQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DG1CqBpfSykW1DDZaTaf0cKsorDz5skja30jv0E1nZUMfUiJi8GUg3Wh3JCgX3fc0 7fFCVjYNm5DGwpDf0sZQhXEJBqTZNZAv+5cauqqpLqqFZPnSoc3YcWre82wM+wFUVw HdAukYgzZE9eVgVArq0H8FwVQ+TLkrdYR/9Zbac0= Date: Fri, 2 Oct 2020 08:22:21 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet Cc: Linux Doc Mailing List , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 04/52] scripts: kernel-doc: make it more compatible with Sphinx 3.x Message-ID: <20201002082221.1df7d39b@coco.lan> In-Reply-To: <20201001154100.2f7e89b8@lwn.net> References: <20201001154100.2f7e89b8@lwn.net> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 1 Oct 2020 15:41:00 -0600 Jonathan Corbet escreveu: > On Wed, 30 Sep 2020 15:24:27 +0200 > Mauro Carvalho Chehab wrote: > > > With Sphinx 3.x, the ".. c:type:" tag was changed to accept either: > > > > .. c:type:: typedef-like declaration > > .. c:type:: name > > > > Using it for other types (including functions) don't work anymore. > > > > So, there are newer tags for macro, enum, struct, union, and others, > > which doesn't exist on older versions. > > > > Add a check for the Sphinx version and change the produced tags > > accordingly. > > > > Signed-off-by: Mauro Carvalho Chehab > > --- > > scripts/kernel-doc | 71 ++++++++++++++++++++++++++++++++++++++++++---- > > 1 file changed, 65 insertions(+), 6 deletions(-) > > So this seems generally good, but I do wonder if we shouldn't just pass > the sphinx version into kernel-doc as a parameter? We're already doing a > version check in the makefile, we should be able to capture the result and > pass it in, maybe? My plan is to work later on a patch adding support for it ;) Yet, there's something to consider: troubleshooting. I mean, if a warning is produced during "make htmldocs", as part of troubleshooting, people do: ./scripts/kernel-doc It sounds more natural that, by default, it will output the same output as the one generated via "make htmldocs". So, the version detection code there sounds the right way for doing it. Yet, as you pointed, as kerneldoc.py knows the Sphinx version, it should be easy for it to pass an argument and avoid version detection, by calling kernel-doc as: ./scripts/kernel-doc --sphinx3 or ./scripts/kernel-doc --sphinx-version 3 (not sure yet about how to name such arguments ;-) ) That might give some performance gain. Btw, with regards to performance, I have a few other ideas that might help how to improve kernel-doc (yet to be verified). At least for now, I opted to keep it more straight without adding more complexity. My plan is to work on those things after the merge window. Thanks, Mauro