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 X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C654C4742C for ; Fri, 30 Oct 2020 07:43:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC6E322203 for ; Fri, 30 Oct 2020 07:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604043797; bh=segxH5qhIJGNNI/Ye3+evMCmvSzyDneJvAcjm8Yoz20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cuonkdLAP/dbZVeAhAdRro3rhgqny/RhSkAi9fr4B5JjVHj9IqCihhhAjouOXCzgD Y7XBi+lClietIyllZGv5P5jAcn8iJgDqsb4cmaMNmE7hnph/cWTjazSxe8WufXkNGk LFCxzV9Crj9V5UxcOI/wt8ePM3C9kEwFYV8DEBpw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725790AbgJ3HnB (ORCPT ); Fri, 30 Oct 2020 03:43:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:51962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbgJ3HlF (ORCPT ); Fri, 30 Oct 2020 03:41:05 -0400 Received: from mail.kernel.org (ip5f5ad5bb.dynamic.kabel-deutschland.de [95.90.213.187]) (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 2B302222C8; Fri, 30 Oct 2020 07:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604043663; bh=segxH5qhIJGNNI/Ye3+evMCmvSzyDneJvAcjm8Yoz20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H09O/s9lOE7VCJcT74ssm7enzkIsq71R1eSmWF2oVB048IXDfiht15x7SLhjV+aTS SaUq8f/2fvwOjvwFWlZsGvGPhumB4gklEJ47wEnMumj1Vw1obKuutBAB1Y+W0dliHI sDM4Zq0PQoKQDy1TEamavtWNHYRAyKFLtaCNoKWI= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kYP1x-004OgH-6T; Fri, 30 Oct 2020 08:41:01 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , linux-kernel@vger.kernel.org Subject: [PATCH v2 22/39] docs: ABI: make it parse ABI/stable as ReST-compatible files Date: Fri, 30 Oct 2020 08:40:41 +0100 Message-Id: <59ccbaa75ff05f23e701dd9a0bbe118e9343a553.1604042072.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 Now that the stable ABI files are compatible with ReST, parse them without converting complex descriptions as literal blocks nor escaping special characters. Please notice that escaping special characters will probably be needed at descriptions, at least for the asterisk character. Signed-off-by: Mauro Carvalho Chehab --- Documentation/admin-guide/abi-stable.rst | 1 + Documentation/sphinx/kernel_abi.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/abi-stable.rst b/Documentation/admin-guide/abi-stable.rst index 7495d7a35048..70490736e0d3 100644 --- a/Documentation/admin-guide/abi-stable.rst +++ b/Documentation/admin-guide/abi-stable.rst @@ -11,3 +11,4 @@ Most interfaces (like syscalls) are expected to never change and always be available. .. kernel-abi:: $srctree/Documentation/ABI/stable + :rst: diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py index ce5f3b0ae811..f3da859c9878 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -73,12 +73,13 @@ class KernelCmd(Directive): u"""KernelABI (``kernel-abi``) directive""" required_arguments = 1 - optional_arguments = 0 + optional_arguments = 2 has_content = False final_argument_whitespace = True option_spec = { - "debug" : directives.flag + "debug" : directives.flag, + "rst" : directives.unchanged } def run(self): @@ -92,6 +93,9 @@ class KernelCmd(Directive): cmd = "get_abi.pl rest --enable-lineno --dir " cmd += self.arguments[0] + if 'rst' in self.options: + cmd += " --rst-source" + srctree = path.abspath(os.environ["srctree"]) fname = cmd -- 2.26.2