Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp168543pxk; Wed, 2 Sep 2020 18:11:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHYF3sm2yOrQ1c4EF3welqfSUgvBth6ciNj35qd/uREt0YW6CA7QUeNVwAmaUWKTYg35V3 X-Received: by 2002:a50:fa94:: with SMTP id w20mr585077edr.206.1599095508350; Wed, 02 Sep 2020 18:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599095508; cv=none; d=google.com; s=arc-20160816; b=XUgoNT/+gJ1349UjIPDOkC3LrUcQq5g8r3RqEZmlHzlHaZP6lMqOIM1vkwOH6YG1Ts 7vyH3ZjvWI86GlrtF0fjvs+7EZkVwlCu9NhKa4oBs6m+gDfsxE1Lro1OCNZheFkIUx+B XnCRrOD9fNPYXrjteMHf2INVYGKEtRFg7s6S5UjZtbTjH78h4Vgh8b3CSON+6TRzMUfK V3FbAiFBnERjt5GS6sav6/PBB+InZ7AU2jSnPyI0Oh9wcWT+M5UIq0F6yWWAfyJaDYRt 8W5ZrGEuqJ9CJ+Bc0OWrdjMm6gfyPhP5hbWZiEaq2aiNpYViZw8AVd5uuwCHw9hHaoi7 gj4Q== 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:subject:reply-to:cc:from:to :dkim-signature:date; bh=sxkfd9M+J+VnTvKc2zZAdsjPkj714FI/Gz/2E9nJ6sE=; b=vEVr/K05H/hJ9rowfVyPsR0HurozRVRoWZtqxWhVq4Fsp/hC3jsqf5kYEeGbaOKtMU F56zjzmh9gNx+s2QTmVBYAxhSZafi6c4XtlKPjoJk1rtLToX2MO1Srsy8tTM/pax4GcC 5/NoqKqOgIi1l6/MpwDBlZqjxf3dl8AKafnmrJyws32/MrFWhnT8lm8aCYGIlNyZ10c9 NX2bW/22+k8QGCNA6OtgA+oxgtjXW9syCnzFkoxOODvGfd/uoriQ4R6alNHiGKCr6O24 Iyd4Tpw4ybTr9y48K2iQ+jNufKAMWfNdJ58nK7FUe7Oez3seztiQV85G6WPy2Pm5QALC IwRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail header.b=VYcYe5cZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si622730edk.256.2020.09.02.18.11.24; Wed, 02 Sep 2020 18:11:48 -0700 (PDT) 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=@protonmail.com header.s=protonmail header.b=VYcYe5cZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728067AbgICA6n (ORCPT + 99 others); Wed, 2 Sep 2020 20:58:43 -0400 Received: from mail-40136.protonmail.ch ([185.70.40.136]:34392 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727996AbgICA6m (ORCPT ); Wed, 2 Sep 2020 20:58:42 -0400 Date: Thu, 03 Sep 2020 00:58:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1599094717; bh=sxkfd9M+J+VnTvKc2zZAdsjPkj714FI/Gz/2E9nJ6sE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=VYcYe5cZA2QLJ09KxWIwaXY92qd/0Zsq1e9zVY8O3u/PF4jh9sWIZbCLPYenV7PbW L9ZafTa14VNRYsbrCJ9CZrNEry6pk+tjclg5439qPYN/uHXTPLgwg+iUHMhdQ0AMzW A1SNe3p8SvQog0d4e/Cmbi0meK4tHiXn5taUn+CI= To: Jonathan Corbet From: =?utf-8?Q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com Reply-To: =?utf-8?Q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Subject: [PATCH 2/2] kernel-doc: Update "cross-referencing from rST" section to use automarkup Message-ID: <20200903005747.3900333-3-nfraprado@protonmail.com> In-Reply-To: <20200903005747.3900333-1-nfraprado@protonmail.com> References: <20200903005747.3900333-1-nfraprado@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update text and examples in the "Cross-referencing from reStructuredText" section to reflect that no additional syntax is needed anymore. Signed-off-by: N=C3=ADcolas F. R. A. Prado --- Documentation/doc-guide/kernel-doc.rst | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-gui= de/kernel-doc.rst index fff6604631ea..4fd86c21397b 100644 --- a/Documentation/doc-guide/kernel-doc.rst +++ b/Documentation/doc-guide/kernel-doc.rst @@ -387,22 +387,23 @@ Domain`_ references. Cross-referencing from reStructuredText ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -To cross-reference the functions and types defined in the kernel-doc comme= nts -from reStructuredText documents, please use the `Sphinx C Domain`_ -references. For example:: - - See function :c:func:`foo` and struct/union/enum/typedef :c:type:`bar`. - -While the type reference works with just the type name, without the -struct/union/enum/typedef part in front, you may want to use:: - - See :c:type:`struct foo `. - See :c:type:`union bar `. - See :c:type:`enum baz `. - See :c:type:`typedef meh `. - -This will produce prettier links, and is in line with how kernel-doc does = the -cross-references. +No additional syntax is needed to cross-reference the functions and types +defined in the kernel-doc comments from reStructuredText documents. +Just end function names with ``()`` and write ``struct``, ``union``, ``enu= m`` +or ``typedef`` before types. +For example:: + + See foo(). + See struct foo. + See union bar. + See enum baz. + See typedef meh. + +However, if you want custom text in the cross-reference link, that can be = done +through the following syntax:: + + See :c:func:`my custom link text for function foo `. + See :c:type:`my custom link text for struct bar `. =20 For further details, please refer to the `Sphinx C Domain`_ documentation. =20 --=20 2.28.0