From nobody Fri Oct 10 14:04:19 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FE5C28F523; Tue, 17 Jun 2025 08:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750147352; cv=none; b=LKX9J5rqMmZ17iYuOXPNRfx+YsriOtwki1IaDbq83+k6UOSVKSYid4kvhhmw3LHsn38hMz6ddrqg9GqDyTjRCMHsOJ+uoVn25pdMMRIR2DOoL8PCiv2SuAUm0dbjtI1E6/OVsODIVjINvTnnhHiDNr5daG+tXVetG4fTV51i3q4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750147352; c=relaxed/simple; bh=C7lqrDjzDa02WPrVr/CYc29SDHPtcet6G1AKkNphAuc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FUTtvOgYCeuBi7qZKqmK40t/cvSRzrBNx6uHx/S4V1dWWYLaD5U3OLtkORlfhmFZHSMQ7eT1c8SXF1GzNovdaFBa7iOSiQi7jcOmRTEUNhI8BCx5+lEms/m3mrQExLSMgdlXY861sGsqKJodovKUGgJovWqKX8kmxiWO7kCBvD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FMBM/Oze; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FMBM/Oze" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02ED8C4CEF8; Tue, 17 Jun 2025 08:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750147352; bh=C7lqrDjzDa02WPrVr/CYc29SDHPtcet6G1AKkNphAuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FMBM/OzeZpbZ6Um9QokRlMfbRtVUJ16O25+5MicNyI/Nd+r+QW6IDIeFM2CH0BDW5 a7Faw+3aLEDR1Tc8mRQ45U+tasXtppQjzmkxvLeAtcWWRSQDy9K2q+JWXUWiEAV/si ZWz+Tm0EYnZYEVA20taQLW4BotFu1NHR8bc8KHdCIlDhxqRELnK2Mc/5Vdonka9QaB ppFAggD1EnxI1MFrmfed3bxakVgTXaMW42TtaNkCarx3G0X5+Dpqnu2kZ+kLTcGWd2 +iEVI4Z5a+u8GYWy4qs+8J6oK1/EfIpdQHDw9AVlV3i9tQxGPteX7XrPDbvTcSgiYr HyH/uD78Yd2nw== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1uRRH4-00000001vdc-11Nz; Tue, 17 Jun 2025 10:02:30 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Akira Yokosawa" , "Breno Leitao" , "David S. Miller" , "Donald Hunter" , "Eric Dumazet" , "Ignacio Encinas Rubio" , "Jan Stancek" , "Marco Elver" , "Mauro Carvalho Chehab" , "Paolo Abeni" , "Ruben Wauters" , "Shuah Khan" , Jakub Kicinski , Simon Horman , joel@joelfernandes.org, linux-kernel-mentees@lists.linux.dev, linux-kernel@vger.kernel.org, lkmm@lists.linux.dev, netdev@vger.kernel.org, peterz@infradead.org, stern@rowland.harvard.edu Subject: [PATCH v5 13/15] tools: ynl_gen_rst.py: drop support for generating index files Date: Tue, 17 Jun 2025 10:02:10 +0200 Message-ID: <4cf209151b11701a0dbf53aa4da95784d2927b63.1750146719.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" As we're now using an index file with a glob, there's no need to generate index files anymore. Signed-off-by: Mauro Carvalho Chehab --- tools/net/ynl/pyynl/netlink_yml_parser.py | 26 ----------------------- tools/net/ynl/pyynl/ynl_gen_rst.py | 17 --------------- 2 files changed, 43 deletions(-) diff --git a/tools/net/ynl/pyynl/netlink_yml_parser.py b/tools/net/ynl/pyyn= l/netlink_yml_parser.py index f71360f0ceb7..866551726723 100755 --- a/tools/net/ynl/pyynl/netlink_yml_parser.py +++ b/tools/net/ynl/pyynl/netlink_yml_parser.py @@ -358,29 +358,3 @@ class YnlDocGenerator: content =3D self.parse_yaml(yaml_data) =20 return content - - def generate_main_index_rst(self, output: str, index_dir: str) -> None: - """Generate the `networking_spec/index` content and write to the f= ile""" - lines =3D [] - - lines.append(self.fmt.rst_header()) - lines.append(self.fmt.rst_label("specs")) - lines.append(self.fmt.rst_title("Netlink Family Specifications")) - lines.append(self.fmt.rst_toctree(1)) - - index_fname =3D os.path.basename(output) - base, ext =3D os.path.splitext(index_fname) - - if not index_dir: - index_dir =3D os.path.dirname(output) - - logging.debug(f"Looking for {ext} files in %s", index_dir) - for filename in sorted(os.listdir(index_dir)): - if not filename.endswith(ext) or filename =3D=3D index_fname: - continue - base, ext =3D os.path.splitext(filename) - lines.append(f" {base}\n") - - logging.debug("Writing an index file at %s", output) - - return "".join(lines) diff --git a/tools/net/ynl/pyynl/ynl_gen_rst.py b/tools/net/ynl/pyynl/ynl_g= en_rst.py index 5d29ce01c60c..9e756d3c403d 100755 --- a/tools/net/ynl/pyynl/ynl_gen_rst.py +++ b/tools/net/ynl/pyynl/ynl_gen_rst.py @@ -32,13 +32,9 @@ def parse_arguments() -> argparse.Namespace: =20 parser.add_argument("-v", "--verbose", action=3D"store_true") parser.add_argument("-o", "--output", help=3D"Output file name") - parser.add_argument("-d", "--input_dir", help=3D"YAML input directory") =20 # Index and input are mutually exclusive group =3D parser.add_mutually_exclusive_group() - group.add_argument( - "-x", "--index", action=3D"store_true", help=3D"Generate the index= page" - ) group.add_argument("-i", "--input", help=3D"YAML file name") =20 args =3D parser.parse_args() @@ -71,15 +67,6 @@ def write_to_rstfile(content: str, filename: str) -> Non= e: rst_file.write(content) =20 =20 -def write_index_rst(parser: YnlDocGenerator, output: str, index_dir: str) = -> None: - """Generate the `networking_spec/index` content and write to the file"= "" - - msg =3D parser.generate_main_index_rst(output, index_dir) - - logging.debug("Writing an index file at %s", output) - write_to_rstfile(msg, output) - - def main() -> None: """Main function that reads the YAML files and generates the RST files= """ =20 @@ -98,10 +85,6 @@ def main() -> None: =20 write_to_rstfile(content, args.output) =20 - if args.index: - # Generate the index RST file - write_index_rst(parser, args.output, args.input_dir) - =20 if __name__ =3D=3D "__main__": main() --=20 2.49.0