From nobody Sat Oct 4 00:31:18 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 6013A2FE564; Fri, 22 Aug 2025 14:19:48 +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=1755872388; cv=none; b=CjF1jBPR9640pDqwZL5jY+oMZgPGimGqPRmCTKAJQYOp6cLpRsdxAPXCkK9GIgB7BEaXoroJkt3SGpqKlnAHyXydCk/yCTQBvK7h/LXgJHFKUOgu1UoH/t3OCXfxTcA3VUhj2d0JBssbkNZZKLG2Q3qLiJmS3dCo7VWLvfHlUrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755872388; c=relaxed/simple; bh=xaVYPkTp3UCaFGLlpkZHV5Y3yGQI0qRfBiGX9ydW30c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ltm+hbG7NGxuUVfp/FSKpO4/5G4sJNkoiqBx1Oh9lpZfUdg05iX0clmP7K9sfBHyWG05ckSfsSB/gtHeQr9kfUBK8c+E/irplrPN4hkHhYDjmuF8Pt9bl++0q7kjYtKkfoJsr3iN4ODCZEB/F+1NOA/7D4JdvrAaBc3UudWDa/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZPDDhWkt; 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="ZPDDhWkt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B03BC19421; Fri, 22 Aug 2025 14:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755872388; bh=xaVYPkTp3UCaFGLlpkZHV5Y3yGQI0qRfBiGX9ydW30c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZPDDhWktb4G+LquyVzJFUAueM1W0FMp3s2jOTA2CUSJFGdOfKE8/6iy//dlqvoTLh WrpIrRbxqnfj9gntTOgJsx9gaI12gZDTYdEp+zlSvzhZeeGfqHfkKnVPSCrqyIO2YA nsfBrEdMrxFuNP1/5f6TLeOIAB/Wd5DrSsx/d+VumIKqJvTpOWf4zPoIGuA4bJuEZ0 DyNHP7+WFX0Q5FFPdiNnTcniubti+Oys12ag3XfaqzIjBarRXBPhXAe3MNjUv8JZJM XZat/DItWzK1WZ/3RgOfIHYVk52EAkUOndsWLX5VcjCofKU//QnxrJxdgr1O/Yshp/ U5GpqeGd7vpLg== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1upScM-0000000CCrB-0zmo; Fri, 22 Aug 2025 16:19:46 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH v2 05/24] docs: parse-headers.py: simplify the rules for hashes Date: Fri, 22 Aug 2025 16:19:17 +0200 Message-ID: <0c011090272f7a1068545409222f970ddb1ed431.1755872208.git.mchehab+huawei@kernel.org> 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