Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3195027pxx; Mon, 2 Nov 2020 02:34:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/LpI6XcA5LemPXvRXF3eTgq9O1PdenH5M6LT3/p6CFz2DpgUfE6oNxzsLy3kI1h7Ttdw2 X-Received: by 2002:a50:fb06:: with SMTP id d6mr15988754edq.312.1604313269099; Mon, 02 Nov 2020 02:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604313269; cv=none; d=google.com; s=arc-20160816; b=A17/+rPGF28Stu7ML+8lvsZPACZXMbxzQCIr/3/hv2GhHbPmxcxFvAkVtJRIdQzsEK UvxXqFBWGoNTzN0Huapk3ZoVUc1FwloX2FGG4tyM4FNuvrWHy2ZbFUtNE0ktCrvK7rtn qmdbymxOXaUaVLNyTXB4bAK7C25R00P1WCteTzcUBNtpRj4mFbNfN+ffJ3m3BKahEOdT p4b5UC9DDQdyC7sHmAF93tvsQbFJcE2ywMmE6thdIOX0ae2ldgbaz1XNfIBCTHw6kvJ/ 9VaEpCvCOuiIVfzE4tp8DVG8WOjueTZ/2huXysYQaLm4jBAd9WjcoTQ53hfBTW1itxs8 vNDg== 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:date:subject:cc:to:from :dkim-signature; bh=8WEID1PZSJe550rcLvvG9IZHW/mtX5bbzsNiR8QAOZo=; b=ndOIzJY0R4vG6wAG26sYU7rcXBrLs5f7p4l9oyDq7gRSuxolBu+eFiEdeLrXcNEuxt 0GPCs+b9jGMxha2Y1fdIdklIHT54R3L2JG+46+6ZmeA9899aqPA2O6D1rkQZR/vMDkWI OiMVASI+jrzInFYJsg9Wz1zkdCFqErNpV5DKcix7yw9ctpGOgYDkmK2v7uorekUw51JK Wvvl+nWHh2dsfruX2LnmZ1k/644c0yiLNY6zYOU/9KcYl9aos6RsZZAPf21hDv8rlSNS 1JSWYF4TrPUaNbbeXV/glMK4MQEMcBvze5G3l+pOEjuqsSqiWkWp0x/kbVCvecRbcDb9 PL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Jh8zHrLE; 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 bs21si9812826ejb.566.2020.11.02.02.34.06; Mon, 02 Nov 2020 02:34:29 -0800 (PST) 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=Jh8zHrLE; 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 S1728544AbgKBKc2 (ORCPT + 99 others); Mon, 2 Nov 2020 05:32:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:57516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728511AbgKBKc1 (ORCPT ); Mon, 2 Nov 2020 05:32:27 -0500 Received: from mail.kernel.org (ip5f5ad5bd.dynamic.kabel-deutschland.de [95.90.213.189]) (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 4D4E2223BE; Mon, 2 Nov 2020 10:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604313146; bh=QUaGIBoAWPb8+PT+LW3xf4ASGlV2LfNoMZjtoIDfME8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jh8zHrLElk5jGAdQLOhXbDwJ34GKZDZhs2tgIYkspzeyp0AnSLmnSPOCLRULrT4JF Pd98UhejS9F8EoKm8LHj6LPilIB4ruys0m4Z+GRWrEL936pYlJGzIkLiy3v8C7veMS pZBnI3hBTyVMs5QZfjAMUtqHTGjs+aXdiJdgLNxA= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kZX8P-005tug-UJ; Mon, 02 Nov 2020 11:32:21 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Linus Torvalds" , "Linux Kernel Mailing List" , "Randy Dunlap" , Cezary Rojewski , Oded Gabbay Subject: [PATCH 4/5] scripts: get_abi.pl: Don't let ABI files to create subtitles Date: Mon, 2 Nov 2020 11:32:15 +0100 Message-Id: <6c62ef5c01d39dee8d891f8390c816d2a889670a.1604312590.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ReST output should only contain documentation titles automatically created by the script. There are two reasons for that: 1) Consistency. just a handful ABI docs define titles 2) To avoid critical errors. Docutils (which is the basis for Sphinx) allows a free assign of documentation title markups. So, one document could be doing things like: Level 1 ======= Level 2 ------- While another one could do the reverse: Level 1 ------- Level 2 ======= But the same document can't mix. As the output of get_abi.pl will join contents from multiple files, if they don't define the levels on a consistent errors, errors like this can happen: Sphinx parallel build error: docutils.utils.SystemMessage: /home/rdunlap/lnx/lnx-510-rc2/Documentation/ABI/testing/sysfs-bus-rapidio:2: (SEVERE/4) Title level inconsistent: Attributes Common for All RapidIO Devices ----------------------------------------- Which cause some versions of Sphinx to go into an endless loop. It should be noticed that an alternative to that would be to replace all title occurrences by a single markup, but that will make the parser more complex, and, due to (1) it would generate an inconsistent output. So, better to just remove the titles defined at the ABI files from the output. Reported-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index 2cb592f8eba4..459f169f834c 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -352,6 +352,12 @@ sub output_rest { if (!($desc =~ /^\s*$/)) { if ($description_is_rst) { + # Remove title markups from the description + # Having titles inside ABI files will only work if extra + # care would be taken in order to strictly follow the same + # level order for each markup. + $desc =~ s/\n[\-\*\=\^\~]+\n/\n\n/g; + # Enrich text by creating cross-references $desc =~ s,Documentation/(?!devicetree)(\S+)\.rst,:doc:`/$1`,g; -- 2.26.2