<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/kernel-doc, branch v6.1.4</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.1.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.1.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2022-06-13T17:07:45Z</updated>
<entry>
<title>scripts: kernel-doc: Always increment warnings counter</title>
<updated>2022-06-13T17:07:45Z</updated>
<author>
<name>Niklas Söderlund</name>
<email>niklas.soderlund@corigine.com</email>
</author>
<published>2022-06-13T09:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=df4bf98ec2d199ae32f215d083774ebb6424bf1f'/>
<id>urn:sha1:df4bf98ec2d199ae32f215d083774ebb6424bf1f</id>
<content type='text'>
Some warnings do not increment the warnings counter making the behavior
of running kernel-doc with -Werror unlogical as some warnings will be
generated but not treated as errors.

Fix this by creating a helper function that always incrementing the
warnings counter every time a warning is emitted. There is one location
in get_sphinx_version() where a warning is not touched as it concerns
the execution environment of the kernel-doc and not the documentation
being processed.

Incrementing the counter only have effect when running kernel-doc in
either verbose mode (-v or environment variable KBUILD_VERBOSE) or when
treating warnings as errors (-Werror or environment variable
KDOC_WERROR). In both cases the number of warnings printed is printed to
stderr and for the later the exit code of kernel-doc is non-zero if
warnings where encountered.

Simple test case to demo one of the warnings,

    $ cat test.c
    /**
     * foo() - Description
     */
    int bar();

    # Without this change
    $ ./scripts/kernel-doc -Werror -none test.c
    test.c:4: warning: expecting prototype for foo(). Prototype was for
    bar() instead

    # With this change
    $ ./scripts/kernel-doc -Werror -none test.c
    test.c:4: warning: expecting prototype for foo(). Prototype was for
    bar() instead
    1 warnings as Errors

Signed-off-by: Niklas Söderlund &lt;niklas.soderlund@corigine.com&gt;
Link: https://lore.kernel.org/r/20220613090510.3088294-1-niklas.soderlund@corigine.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: change the line number meta info</title>
<updated>2022-03-28T19:53:46Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@kernel.org</email>
</author>
<published>2022-03-26T10:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b79dfef0e2fcf41c736e7012c59d1260aa60f075'/>
<id>urn:sha1:b79dfef0e2fcf41c736e7012c59d1260aa60f075</id>
<content type='text'>
In order to make it more standard and ReST compatible,
change the meta-tag used with --enable-lineno from:

        #define LINENO

to
        .. LINENO

In practice, no	functional changes.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Link: https://lore.kernel.org/r/40725032b5a4a33db740bf1de397523af958ff8a.1648290305.git.mchehab@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>docs: scripts/kernel-doc: Detect absence of FILE arg</title>
<updated>2022-02-24T19:13:19Z</updated>
<author>
<name>Akira Yokosawa</name>
<email>akiyks@gmail.com</email>
</author>
<published>2022-02-24T13:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e334f873eb4e1638dd0b45200d2d8838a13b0cac'/>
<id>urn:sha1:e334f873eb4e1638dd0b45200d2d8838a13b0cac</id>
<content type='text'>
Currently, when there is no FILE argument following a switch such
as -man, -rst, or -none, kernel-doc exits with a warning from perl
(long msg folded):

    Use of uninitialized value $ARGV[0] in pattern match (m//)
    at ./scripts/kernel-doc line 438.

, which is unhelpful.

Improve the behavior by adding a check at the bottom of parsing
loop.
If the argument is absent, display help text and exit with
the code of 1 (via usage()).

Signed-off-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Link: https://lore.kernel.org/r/7b136049-a3ba-0eb5-8717-364d773ff914@gmail.com
[jc: reworked to fix conflict with pod patches]
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Refresh the copyright lines</title>
<updated>2022-02-24T17:52:47Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2b306ecaf57b2b5004dcb671a46ef24a1c369db2'/>
<id>urn:sha1:2b306ecaf57b2b5004dcb671a46ef24a1c369db2</id>
<content type='text'>
I wanted to clean up these lines, but in the end decided not to touch
the old ones and just add my own about POD. I'll leave the cleanup
for lawyers.

Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-12-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Drop obsolete comments</title>
<updated>2022-02-24T17:52:47Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=258092a89085ed9536da00f27d8ddbe083c9ea0a'/>
<id>urn:sha1:258092a89085ed9536da00f27d8ddbe083c9ea0a</id>
<content type='text'>
What for? To improve the script maintainability.

1. License

As stated by Jonathan Corbet in the reply to my version 1, the SPDX line
is enough.

2. The to-do list comment

As suggested by Jonathan Corbet in reply to my version 3, this section
doesn't need to be transitioned. And so it is removed for clarity.

3. The historical changelog comments

As suggested by Jonathan Corbet in a reply to v3, this section can go.
I wanted to keep it, but since it doesn't contain copyright notices,
let's just have it clean and simple.

4. The "format of comments" comment block

As suggested by Jani Nikula in a reply to my first version of this
transformation, Documentation/doc-guide/kernel-doc.rst can serve as the
information hub for comment formatting. The section DESCRIPTION already
points there, so the original comment block can just be removed.

Suggested-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Suggested-by: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-11-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Replace the usage function</title>
<updated>2022-02-24T17:52:46Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=252b47da9fd9eeebbdaed448aea71010261d7dc4'/>
<id>urn:sha1:252b47da9fd9eeebbdaed448aea71010261d7dc4</id>
<content type='text'>
Aim: unified POD, user more satisfied, script better structured

You can see the results with:

$ scripts/kernel-doc -help

Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-10-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Translate the "Other parameters" subsection of OPTIONS</title>
<updated>2022-02-24T17:52:46Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=834cf6b9039e6f6ebd73cc4da51cc8bc802ca777'/>
<id>urn:sha1:834cf6b9039e6f6ebd73cc4da51cc8bc802ca777</id>
<content type='text'>
Aim: unified POD, user more satisfied, script better structured

Notes:
- The -help token is added.
- The entries are sorted alphbetically.

Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-9-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Translate the "Output selection modifiers" subsection of OPTIONS</title>
<updated>2022-02-24T17:52:46Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c15de5a19a2881205f6f893869584c99cbe4fae4'/>
<id>urn:sha1:c15de5a19a2881205f6f893869584c99cbe4fae4</id>
<content type='text'>
Aim: unified POD, user more satisfied, script better structured

A subsection "reStructuredText only" is added for -enable-lineno.

Other notes:
- paragraphing correction

Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-8-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Translate the "Output selection" subsection of OPTIONS</title>
<updated>2022-02-24T17:52:46Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c77f108f43ae08e560f54c817d4aeb4857dc783'/>
<id>urn:sha1:9c77f108f43ae08e560f54c817d4aeb4857dc783</id>
<content type='text'>
Aim: unified POD, user more satisfied, script better structured

The plurals in -function and -nosymbol are corrected to singulars.
That's how the script works now. I think this describes the syntax better.
The plurar suggests multiple FILE arguments might be possible. So this
seems more coherent.

Other notes:
- paragraphing correction
- article correction

Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-7-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts: kernel-doc: Translate the "Output format selection modifier" subsection of OPTIONS</title>
<updated>2022-02-24T17:52:46Z</updated>
<author>
<name>Tomasz Warniełło</name>
<email>tomasz.warniello@gmail.com</email>
</author>
<published>2022-02-18T18:16:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dd803b04b0a0af16e43c2af1a3e67d7ce8e1f899'/>
<id>urn:sha1:dd803b04b0a0af16e43c2af1a3e67d7ce8e1f899</id>
<content type='text'>
Aim: unified POD, user more happy

This section is renamed to "Output format modifiers" to make it simple.

To make it even more simple, a subsection is added:
"reStructuredText only".

Other notes:
- paragraphing correction
- article correction

Signed-off-by: Tomasz Warniełło &lt;tomasz.warniello@gmail.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Disliked-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Link: https://lore.kernel.org/r/20220218181628.1411551-6-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
</feed>
