From nobody Sat Oct 4 01:44:55 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 6ABA4279DBB; Thu, 21 Aug 2025 14:21:39 +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=1755786099; cv=none; b=e5RV5fbJUEteFUJQavPIvXBPXjo5KA0rwVK/u3Rubdnz6Snuao76pFxPdgGmtOVnWH9A7OcXbw7Etb7e4kHvWQQvwz32vYeuo7nYb/vKn/ELrD4oSZ9v384b2DDvQTDjXJ9xW4qDXB9NUPxrR7evNd8tVh6sJYWmjH4dTmgb29M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755786099; c=relaxed/simple; bh=xaVYPkTp3UCaFGLlpkZHV5Y3yGQI0qRfBiGX9ydW30c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VOzYofgx58BZSXJ/D1IsuJELJDYJV/FnC/m4t817ry20eyoDChlJIRj6K/Xd+yG0VVsSob5RwKdbn4JO6OHBSXVTfJZvrKrXQL8ajSBAD5jQvpsBo2FbmbKZgISw/0EL9q7NuBNCA3xlFFjttN01QTK0maHaho8aqTJiiYzeAxM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rGK50HqV; 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="rGK50HqV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12CEEC113CF; Thu, 21 Aug 2025 14:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755786099; bh=xaVYPkTp3UCaFGLlpkZHV5Y3yGQI0qRfBiGX9ydW30c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rGK50HqV4D2ftJ2wJq/Of1l9eBbyC4BggYHUAfuBniHo9urdjCJ7IDlYwSoMBj7gF gm8NDxRgbuQW4RFF5/xx++rbT64HbhwNvgRzBosFVnQwgmQ1fsTyYpL/2il5sMBtN0 b2mnyjM0zsZcyf20ZmPXNa+Ug/hj4vYeJll7axZebnqjQQy5RpexOuVrBqhRNa+Xc1 mwOCWaGkwrsV4p39o+Zorhx1wORB0g2132toww4ME8F6rq2fBWZWwSvYpClJaHMUgj CPHyCEntf1vSxs0PZBFWkx1soa+/Ot0V1V7of1I8qZlc+hmybUXqwSqJPyzxFLyXgG edf6tdxcgRJpA== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1up6Ab-0000000BT8K-0TDw; Thu, 21 Aug 2025 16:21:37 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: [PATCH 05/24] docs: parse-headers.py: simplify the rules for hashes Date: Thu, 21 Aug 2025 16:21:11 +0200 Message-ID: X-Mailer: git-send-email 2.50.1 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" Normal :ref domain accept either hashes or underscores, but c-domain ones don't. Fix it and remove unneeded places where we opt to disable underscore transformation. Ideally, we should have a rule about the default, or change the way media docs have their references. Signed-off-by: Mauro Carvalho Chehab --- Documentation/sphinx/parse-headers.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/sphinx/parse-headers.py b/Documentation/sphinx/p= arse-headers.py index f4ab9c49d2f5..344090ef259c 100755 --- a/Documentation/sphinx/parse-headers.py +++ b/Documentation/sphinx/parse-headers.py @@ -162,7 +162,8 @@ class ParseHeader: if not ref_name: ref_name =3D symbol.lower() =20 - if replace_underscores: + # c-type references don't support hash + if ref_type =3D=3D ":ref" and replace_underscores: ref_name =3D ref_name.replace("_", "-") =20 ref_link =3D f"{ref_type}:`{symbol} <{ref_name}>`" @@ -258,8 +259,7 @@ class ParseHeader: if match: name =3D match.group(2).strip() symbol =3D match.group(3) - self.store_type("typedef", symbol, ref_name=3Dname, - replace_underscores=3DFalse) + self.store_type("typedef", symbol, ref_name=3Dname) continue =20 for re_enum in self.RE_ENUMS: @@ -272,8 +272,7 @@ class ParseHeader: for re_struct in self.RE_STRUCTS: match =3D re_struct.match(line) if match: - self.store_type("struct", match.group(1), - replace_underscores=3DFalse) + self.store_type("struct", match.group(1)) break =20 def process_exceptions(self, fname: str): --=20 2.50.1