<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/kernel-doc, branch v5.5.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.5.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.5.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-11-07T20:17:24Z</updated>
<entry>
<title>scripts/kernel-doc: Add support for named variable macro arguments</title>
<updated>2019-11-07T20:17:24Z</updated>
<author>
<name>Jonathan Neuschäfer</name>
<email>j.neuschaefer@gmx.net</email>
</author>
<published>2019-11-07T13:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43756e347f213b68f884c3b4082e95e7f98204f1'/>
<id>urn:sha1:43756e347f213b68f884c3b4082e95e7f98204f1</id>
<content type='text'>
Currently, when kernel-doc encounters a macro with a named variable
argument[1], such as this:

   #define hlist_for_each_entry_rcu(pos, head, member, cond...)

... it expects the variable argument to be documented as `cond...`,
rather than `cond`. This is semantically wrong, because the name (as
used in the macro body) is actually `cond`.

With this patch, kernel-doc will accept the name without dots (`cond`
in the example above) in doc comments, and warn if the name with dots
(`cond...`) is used and verbose mode[2] is enabled.

The support for the `cond...` syntax can be removed later, when the
documentation of all such macros has been switched to the new syntax.

Testing this patch on top of v5.4-rc6, `make htmldocs` shows a few
changes in log output and HTML output:

 1) The following warnings[3] are eliminated:

   ./include/linux/rculist.h:374: warning:
        Excess function parameter 'cond' description in 'list_for_each_entry_rcu'
   ./include/linux/rculist.h:651: warning:
        Excess function parameter 'cond' description in 'hlist_for_each_entry_rcu'

 2) For list_for_each_entry_rcu and hlist_for_each_entry_rcu, the
    correct description is shown

 3) Named variable arguments are shown without dots

[1]: https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
[2]: scripts/kernel-doc -v
[3]: See also https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?h=dev&amp;id=5bc4bc0d6153617eabde275285b7b5a8137fdf3c

Signed-off-by: Jonathan Neuschäfer &lt;j.neuschaefer@gmx.net&gt;
Tested-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: add support for ____cacheline_aligned_in_smp attribute</title>
<updated>2019-10-01T12:57:17Z</updated>
<author>
<name>André Almeida</name>
<email>andrealmeid@collabora.com</email>
</author>
<published>2019-09-17T19:41:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f861537d5f856f8bffc7ddd1f9c1a59bfed0012a'/>
<id>urn:sha1:f861537d5f856f8bffc7ddd1f9c1a59bfed0012a</id>
<content type='text'>
Subroutine dump_struct uses type attributes to check if the struct
syntax is valid. Then, it removes all attributes before using it for
output. `____cacheline_aligned_in_smp` is an attribute that is
not included in both steps. Add it, since it is used by kernel structs.

Signed-off-by: André Almeida &lt;andrealmeid@collabora.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: fix processing nested structs with attributes</title>
<updated>2019-10-01T12:57:12Z</updated>
<author>
<name>André Almeida</name>
<email>andrealmeid@collabora.com</email>
</author>
<published>2019-09-17T19:41:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2b5f78e5e942d76e5497f53c2298900224b52c51'/>
<id>urn:sha1:2b5f78e5e942d76e5497f53c2298900224b52c51</id>
<content type='text'>
The current regular expression for strip attributes of structs (and
for nested ones as well) also removes all whitespaces that may
surround the attribute. After that, the code will split structs and
iterate for each symbol separated by comma at the end of struct
definition (e.g. "} alias1, alias2;"). However, if the nested struct
does not have any alias and has an attribute, it will result in a
empty string at the closing bracket (e.g "};"). This will make the
split return nothing and $newmember will keep uninitialized. Fix
that, by ensuring that the attribute substitution will leave at least
one whitespace.

Signed-off-by: André Almeida &lt;andrealmeid@collabora.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: Allow anonymous enum</title>
<updated>2019-08-12T21:00:37Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2019-08-12T16:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=15e2544ed38a1e39b702277bdcd2bb1275e78925'/>
<id>urn:sha1:15e2544ed38a1e39b702277bdcd2bb1275e78925</id>
<content type='text'>
In C is a valid construction to have an anonymous enumerator.

Though we have now:

  drivers/pinctrl/intel/pinctrl-intel.c:240: error: Cannot parse enum!

Support it in the kernel-doc script.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: ignore __printf attribute</title>
<updated>2019-08-06T17:22:47Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-08-05T16:29:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=95e760cbf62755bd3d8999bee1e6579f0ff1425e'/>
<id>urn:sha1:95e760cbf62755bd3d8999bee1e6579f0ff1425e</id>
<content type='text'>
Ignore __printf() function attributes just as other __attribute__
strings are ignored.

Fixes this kernel-doc warning message:
include/kunit/kunit-stream.h:58: warning: Function parameter or member '2' not described in '__printf'

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Tested-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: Don't try to mark up function names</title>
<updated>2019-06-26T17:14:15Z</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2019-06-21T23:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=344fdb28a0dfac2e42925f149029748b34d2effa'/>
<id>urn:sha1:344fdb28a0dfac2e42925f149029748b34d2effa</id>
<content type='text'>
We now have better automarkup in sphinx itself and, besides, this markup
was incorrect and left :c:func: gunk in the processed docs.  Sort of
discouraging that nobody ever noticed...:)

As a first step toward the removal of impenetrable regex magic from
kernel-doc it's a tiny one, but you have to start somewhere.

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: always name missing kerneldoc sections</title>
<updated>2019-05-27T22:23:55Z</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2019-05-24T20:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0d60bfbb60cef1efd699a65e29a94487f8c7b1f'/>
<id>urn:sha1:b0d60bfbb60cef1efd699a65e29a94487f8c7b1f</id>
<content type='text'>
The "no structured comments found" warning is not particularly useful if
there are several invocations, one of which is looking for something
wrong.  So if something specific has been requested, make it clear that
it's the one we weren't able to find.

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: suppress 'not described' warnings for embedded struct fields</title>
<updated>2019-01-16T22:04:01Z</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2019-01-11T19:31:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be5cd20c9b491504dfb9105404913de25c47c580'/>
<id>urn:sha1:be5cd20c9b491504dfb9105404913de25c47c580</id>
<content type='text'>
The ability to add kerneldoc comments for fields in embedded structures is
useful, but it brought along a whole bunch of warnings for fields that
could not be described before.  In many cases, there's little value in
adding docs for these nested fields, and in cases like:

       	struct a {
            struct b {
	        int c;
	    } d, e;
	};

"c" would have to be described twice (as d.c and e.c) to make the warnings
go away.

We can no doubt do something smarter, but simply suppressing the warnings
for this case removes about 70 warnings from the docs build, freeing us to
focus on the ones that matter more.  So make kerneldoc be silent about
missing descriptions for any field containing a ".".

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Fix struct and struct field attribute processing</title>
<updated>2018-11-25T19:35:45Z</updated>
<author>
<name>Sakari Ailus</name>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2018-11-22T11:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3d9bfb19bd705f503ac7afc2776d5d56dab88858'/>
<id>urn:sha1:3d9bfb19bd705f503ac7afc2776d5d56dab88858</id>
<content type='text'>
The kernel-doc attempts to clear the struct and struct member attributes
from the API documentation it produces. It falls short of the job in the
following respects:

- extra whitespaces are left where __attribute__((...)) was removed,

- only a single attribute is removed per struct,

- attributes (such as aligned) containing numbers were not removed,

- attributes are only cleared from struct fields, not structs themselves.

This patch addresses these issues by removing the attributes.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kernel-doc: extend $type_param to match members referenced by pointer</title>
<updated>2018-11-07T22:39:06Z</updated>
<author>
<name>Mike Rapoport</name>
<email>rppt@linux.ibm.com</email>
</author>
<published>2018-11-07T16:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bfd228c73090e594efce24fa0f299272bef53c6d'/>
<id>urn:sha1:bfd228c73090e594efce24fa0f299272bef53c6d</id>
<content type='text'>
Currently, function parameter description can match '@type.member'
expressions but fails to match '@type-&gt;member'.
Extend the $type_param regex to allow matching both

Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
</feed>
