linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: kunit: Fix cross-referencing warnings
@ 2022-03-26  5:44 David Gow
  2022-03-28 16:51 ` Brendan Higgins
  2022-03-28 20:02 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: David Gow @ 2022-03-26  5:44 UTC (permalink / raw)
  To: Brendan Higgins, Jonathan Corbet
  Cc: David Gow, Marco Elver, Daniel Latypov, skhan, kunit-dev,
	linux-doc, linux-kselftest, linux-kernel

The Architecture chapter of the KUnit documentation tried to include
copies of the kernel-doc for a couple of things, despite these already
existing in the API documentation. This lead to some warnings:

architecture:31: ./include/kunit/test.h:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66.
Declaration is '.. c:struct:: kunit_case'.
architecture:163: ./include/kunit/test.h:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217.
Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'.
architecture.rst:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66.
Declaration is '.. c:struct:: kunit_case'.
architecture.rst:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217.
Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'.

Get rid of these, and cleanup the mentions of the struct and macro in
question so that sphinx generates a link to the existing copy of the
documentation in the api/test document.

Fixes: bc145b370c ("Documentation: KUnit: Added KUnit Architecture")
Signed-off-by: David Gow <davidgow@google.com>
---
 Documentation/dev-tools/kunit/architecture.rst | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/Documentation/dev-tools/kunit/architecture.rst b/Documentation/dev-tools/kunit/architecture.rst
index aa2cea821e25..ff9c85a0bff2 100644
--- a/Documentation/dev-tools/kunit/architecture.rst
+++ b/Documentation/dev-tools/kunit/architecture.rst
@@ -26,10 +26,7 @@ The fundamental unit in KUnit is the test case. The KUnit test cases are
 grouped into KUnit suites. A KUnit test case is a function with type
 signature ``void (*)(struct kunit *test)``.
 These test case functions are wrapped in a struct called
-``struct kunit_case``. For code, see:
-
-.. kernel-doc:: include/kunit/test.h
-	:identifiers: kunit_case
+struct kunit_case.
 
 .. note:
 	``generate_params`` is optional for non-parameterized tests.
@@ -152,18 +149,12 @@ Parameterized Tests
 Each KUnit parameterized test is associated with a collection of
 parameters. The test is invoked multiple times, once for each parameter
 value and the parameter is stored in the ``param_value`` field.
-The test case includes a ``KUNIT_CASE_PARAM()`` macro that accepts a
+The test case includes a KUNIT_CASE_PARAM() macro that accepts a
 generator function.
 The generator function is passed the previous parameter and returns the next
 parameter. It also provides a macro to generate common-case generators based on
 arrays.
 
-For code, see:
-
-.. kernel-doc:: include/kunit/test.h
-	:identifiers: KUNIT_ARRAY_PARAM
-
-
 kunit_tool (Command Line Test Harness)
 ======================================
 
-- 
2.35.1.1021.g381101b075-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: kunit: Fix cross-referencing warnings
  2022-03-26  5:44 [PATCH] Documentation: kunit: Fix cross-referencing warnings David Gow
@ 2022-03-28 16:51 ` Brendan Higgins
  2022-03-28 20:02 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Brendan Higgins @ 2022-03-28 16:51 UTC (permalink / raw)
  To: David Gow
  Cc: Jonathan Corbet, Marco Elver, Daniel Latypov, skhan, kunit-dev,
	linux-doc, linux-kselftest, linux-kernel

On Sat, Mar 26, 2022 at 1:45 AM David Gow <davidgow@google.com> wrote:
>
> The Architecture chapter of the KUnit documentation tried to include
> copies of the kernel-doc for a couple of things, despite these already
> existing in the API documentation. This lead to some warnings:
>
> architecture:31: ./include/kunit/test.h:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66.
> Declaration is '.. c:struct:: kunit_case'.
> architecture:163: ./include/kunit/test.h:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217.
> Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'.
> architecture.rst:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66.
> Declaration is '.. c:struct:: kunit_case'.
> architecture.rst:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217.
> Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'.
>
> Get rid of these, and cleanup the mentions of the struct and macro in
> question so that sphinx generates a link to the existing copy of the
> documentation in the api/test document.
>
> Fixes: bc145b370c ("Documentation: KUnit: Added KUnit Architecture")
> Signed-off-by: David Gow <davidgow@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: kunit: Fix cross-referencing warnings
  2022-03-26  5:44 [PATCH] Documentation: kunit: Fix cross-referencing warnings David Gow
  2022-03-28 16:51 ` Brendan Higgins
@ 2022-03-28 20:02 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2022-03-28 20:02 UTC (permalink / raw)
  To: David Gow, Brendan Higgins
  Cc: David Gow, Marco Elver, Daniel Latypov, skhan, kunit-dev,
	linux-doc, linux-kselftest, linux-kernel

David Gow <davidgow@google.com> writes:

> The Architecture chapter of the KUnit documentation tried to include
> copies of the kernel-doc for a couple of things, despite these already
> existing in the API documentation. This lead to some warnings:
>
> architecture:31: ./include/kunit/test.h:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66.
> Declaration is '.. c:struct:: kunit_case'.
> architecture:163: ./include/kunit/test.h:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217.
> Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'.
> architecture.rst:3: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:66.
> Declaration is '.. c:struct:: kunit_case'.
> architecture.rst:1217: WARNING: Duplicate C declaration, also defined at dev-tools/kunit/api/test:1217.
> Declaration is '.. c:macro:: KUNIT_ARRAY_PARAM'.
>
> Get rid of these, and cleanup the mentions of the struct and macro in
> question so that sphinx generates a link to the existing copy of the
> documentation in the api/test document.
>
> Fixes: bc145b370c ("Documentation: KUnit: Added KUnit Architecture")
> Signed-off-by: David Gow <davidgow@google.com>
> ---
>  Documentation/dev-tools/kunit/architecture.rst | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-28 20:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-26  5:44 [PATCH] Documentation: kunit: Fix cross-referencing warnings David Gow
2022-03-28 16:51 ` Brendan Higgins
2022-03-28 20:02 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).