Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1091091ybi; Fri, 14 Jun 2019 08:28:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9RsgAGRK/QvJQbGveibHdj/Y3EFS4Pb76fdvDYYHnvTCBaFqe7QhMD2n1mqzGABDDc5oG X-Received: by 2002:a17:90a:35e5:: with SMTP id r92mr9709219pjb.34.1560526113231; Fri, 14 Jun 2019 08:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560526113; cv=none; d=google.com; s=arc-20160816; b=JKRXfjqvWEopbraCFUcMuwMtJKz8O/T7JJIKDv/vnI/15PmhrY9cyoOq6p/eiJPTQF FAYYxgOj3WwT/O0mTPXuYaB6ievmx1wXLd7ExzI3wagBRGXHVjnd4M0uuT1L67yHoy/3 pNbs2kBiPPHlO9NscfRB99vX/ryYGrIjCQxOzuhykQHS2vEA5M1adBpMpWd3WB1x/8Jr UhihQoD+3rzpxp1sI7QUfTPy4+4Z212OKSMhdw4ds6amn7wC/emAVauaeDZgs8HguOj5 rS2HOotR4X+yeWVFAOgBdrzlDHMJXI4ssjs7o4xx3lRzmrCMeH3re2qIu2aftpJBgVof gqCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zkYfXJDrba3J/ihhf3pDgW4+XmjWJ9BtTd3Y+UzyafE=; b=T5VV8ndkvaGu/oaAxt46x3c2tNmFG6aDme3zev+hyFp1S2x5uuNFObJWc1FD7p0/S1 VZId50id+DbXIpFpHDH87FAwSz2/4etRvpDESyGTY5EVV2LsU+O3fIY8XEguL3Ho3PaO O/CtB5wKX1yXEI8cgMtH2l/VqA5S97WCToDqtZJ7ldLSAbc1IyElxOearyd9EZaqsMp9 2x4Tn2SR8OfTM0WI4v2o0mH9Cn7+6Tjlf+iD0l9T9nQyfqxdTyT7Wut+qVuBDzu35EzM tznK2cuinRLY5GYbVQ2rksjN0W7i5463izOljMJ2p4koOA+kdz29KgIFwbECW+wgC8ji o0kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BS4Zrbvj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y138si2729257pfb.3.2019.06.14.08.28.16; Fri, 14 Jun 2019 08:28:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BS4Zrbvj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726369AbfFNP2D (ORCPT + 99 others); Fri, 14 Jun 2019 11:28:03 -0400 Received: from casper.infradead.org ([85.118.1.10]:44860 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbfFNP2D (ORCPT ); Fri, 14 Jun 2019 11:28:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zkYfXJDrba3J/ihhf3pDgW4+XmjWJ9BtTd3Y+UzyafE=; b=BS4ZrbvjFPyHk5xTId0ecXBLat Eni7lDtC5c80433fhcjoauEll6LtbS9S/fsvWv32ufxW/XTHAPEcfTjASF3wf4Gc1lv6TBtc1ZYsC G/xseTJ8Z9UFEWcexun0lnArWMTwuyO3ZJlueKfxsLz0G1iTTU4KbBn3OVFbN+qCpR5hCPA/LGzvv xblKmJx45lS/5NxhKoFJIHGB5Q/dov5mWXKaIopI66sCnlkHoR8M39ZKTlsorzUjs9i+7MUVyWrFb Lj/Lb26SC48111GgRl0/zFEiTsCzUXyvLUerQHrwifk/U/+d7jEM0JFcQZp46DZop5KvdDI28SemZ ib7N4LrQ==; Received: from 177.133.85.52.dynamic.adsl.gvt.net.br ([177.133.85.52] helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hbo7T-0007sx-Kb; Fri, 14 Jun 2019 15:28:00 +0000 Date: Fri, 14 Jun 2019 12:27:55 -0300 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: Jani Nikula , Linux Doc Mailing List , Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: Re: [PATCH 12/14] doc-rst: add ABI documentation to the admin-guide book Message-ID: <20190614122755.1c7b4898@coco.lan> In-Reply-To: <20190614140603.GB7234@kroah.com> References: <9da2a7f6ff57d9d53dcbb964eb310f7956522870.1560477540.git.mchehab+samsung@kernel.org> <87o930uvur.fsf@intel.com> <20190614140603.GB7234@kroah.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, 14 Jun 2019 16:06:03 +0200 Greg Kroah-Hartman escreveu: > On Fri, Jun 14, 2019 at 04:42:20PM +0300, Jani Nikula wrote: > > On Thu, 13 Jun 2019, Mauro Carvalho Chehab wrote: > > > From: Mauro Carvalho Chehab > > > > > > As we don't want a generic Sphinx extension to execute commands, > > > change the one proposed to Markus to call the abi_book.pl > > > script. > > > > > > Use a script to parse the Documentation/ABI directory and output > > > it at the admin-guide. > > > > We had a legacy kernel-doc perl script so we used that instead of > > rewriting it in python. Just to keep it bug-for-bug compatible with the > > past. That was the only reason. > > > > I see absolutely zero reason to add a new perl monstrosity with a python > > extension to call it. All of this could be better done in python, > > directly. > > > > Please don't complicate the documentation build. I know you know we all > > worked hard to take apart the old DocBook Rube Goldberg machine to > > replace it with Sphinx. Please don't turn the Sphinx build to another > > complicated mess. > > > > My strong preferences are, in this order: > > > > 1) Convert the ABI documentation to reStructuredText > > What would that exactly look like? What would it require for new > developers for when they write new entries? Why not rely on a helper > script, that allows us to validate things better? Funny enough, this e-mail arrived here after Greg's reply, and my reply over his one :-) - With regards to the script, my idea is to have it run on a new "validate" mode, when the Kernel is built with COMPILE_TEST: https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v4 NB: the last patch is not yet... somehow, the building system is not passing CONFIG_WARN_ABI_ERRORS to Documentation/Makefile. I'm debugging it. Personally, I would prefer to keep it the way it is, with two additions: 1) I would add a SPDX header at the fist line of each file there; 2) It would make sense to have a new field - or indicator - to let add ReST markups at the description. The advantage of using a parseable ABI file is that it is possible to parse it, for example, to search for a symbol: $ ./scripts/get_abi.pl voltage_max /sys/class/power_supply//voltage_max ------------------------------------------------- Date: January 2008 Contact: linux-pm@vger.kernel.org Defined on file: Documentation/ABI/testing/sysfs-class-power Description: Reports the maximum VBUS voltage the supply can support. Access: Read Valid values: Represented in microvolts ... > > > 2) Have the python extension read the ABI files directly, without an > > extra pipeline. > > He who writes the script, get's to dictate the language of the script :) No idea about how much time it would take if written in python, but this perl script is really fast: $ time ./scripts/get_abi.pl search voltage_max >/dev/null real 0m0,139s user 0m0,132s sys 0m0,006s That's the time it takes here (SSD disks) to read all files under Documentation/ABI, parse them and seek for a string. That's about half of the time a python script takes to just import the the sphinx modules and print its version, running at the same machine: $ time sphinx-build --version >/dev/null real 0m0,224s user 0m0,199s sys 0m0,024s > Personally, this looks sane to me, I'm going to apply the ABI fixups to > my tree at least, and then see how the script works out. The script can > always be replaced with a different one in a different language at a > later point in time of people think it really mattes. Thanks, Mauro