<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/scripts/kernel-doc, branch doc/4.4</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=doc%2F4.4</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=doc%2F4.4'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-09-13T20:38:51+00:00</updated>
<entry>
<title>scripts/kernel-doc: Replacing highlights hash by an array</title>
<updated>2015-09-13T20:38:51+00:00</updated>
<author>
<name>Danilo Cesar Lemes de Paula</name>
<email>danilo.cesar@collabora.co.uk</email>
</author>
<published>2015-09-07T20:01:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4d73270192ec8238135d9fb65b49f6f42f50818d'/>
<id>urn:sha1:4d73270192ec8238135d9fb65b49f6f42f50818d</id>
<content type='text'>
The "highlight" code is very sensible to the order of the hash keys,
but the order of the keys cannot be predicted. It generates
faulty DocBook entries like:
	- @&lt;function&gt;device_for_each_child&lt;/function&gt;

Sorting the result is not enough some times (as it's deterministic but
we can't control it).
We should use an array for that job, so we can guarantee that the order
of the regex execution on dohighlight is correct.

[jc: I think this is kind of papering around the real problem, that people
 are saying @function() when "function" is not a parameter.  But this makes
 things better than they were before, so...]

Signed-off-by: Danilo Cesar Lemes de Paula &lt;danilo.cesar@collabora.co.uk&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: Avoid creating man pages in source tree</title>
<updated>2015-09-13T20:38:50+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2015-09-01T22:48:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=68f86662380c343317325c024d6a35221f1908ac'/>
<id>urn:sha1:68f86662380c343317325c024d6a35221f1908ac</id>
<content type='text'>
Currently kernel-doc generates a dummy DocBook file when asked to
convert a C source file with no structured comments.  For an
out-of-tree build (objtree != srctree), the title of the output file
is the absolute path name of the C source file, which later results
in a manual page being created alongside the C source file.

Change the title to be a relative path.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Processing -nofunc for functions only</title>
<updated>2015-09-13T20:38:50+00:00</updated>
<author>
<name>Danilo Cesar Lemes de Paula</name>
<email>danilo.cesar@collabora.co.uk</email>
</author>
<published>2015-09-01T17:44:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=23aebb3c05f3b3fb06a68bf6b1539a05a5f8aaab'/>
<id>urn:sha1:23aebb3c05f3b3fb06a68bf6b1539a05a5f8aaab</id>
<content type='text'>
Docproc processes the EXPORT_SYMBOL(f1) macro and uses -nofunc f1 to
avoid duplicated documentation in the next call.
It works for most of the cases, but there are some specific situations
where a struct has the same name of an already-exported function.

Current kernel-doc behavior ignores those structs and does not add them
to the final documentation. This patch fixes it.

This is unusual, the only case I've found is the drm_modeset_lock
(function and struct) defined in drm_modeset_lock.h and
drm_modeset_lock.c. Considering this, it should only affect the DRM
documentation by including struct drm_modeset_lock to the final Docbook.

Signed-off-by: Danilo Cesar Lemes de Paula &lt;danilo.cesar@collabora.co.uk&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>kerneldoc: Convert error messages to GNU error message format</title>
<updated>2015-09-04T23:54:41+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2015-09-04T22:43:21+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d40e1e6532efbb40f8fc1f5af093063a3d186754'/>
<id>urn:sha1:d40e1e6532efbb40f8fc1f5af093063a3d186754</id>
<content type='text'>
Editors like emacs and vi recognize a number of error message formats.
The format used by the kerneldoc tool is not recognized by emacs.

Change the kerneldoc error message format to the GNU style such that the
emacs prev-error and next-error commands can be used to navigate through
kerneldoc error messages.  For more information about the GNU error
message format, see also
  https://www.gnu.org/prep/standards/html_node/Errors.html.

This patch has been generated via the following sed command:

  sed -i.orig 's/Error(\${file}:\$.):/\${file}:\$.: error:/g;s/Warning(\${file}:\$.):/\${file}:\$.: warning:/g;s/Warning(\${file}):/\${file}:1: warning:/g;s/Info(\${file}:\$.):/\${file}:\$.: info:/g' scripts/kernel-doc

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Johannes Berg &lt;johannes.berg@intel.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kernel-doc: ignore unneeded attribute information</title>
<updated>2015-08-23T19:54:33+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2015-08-23T19:35:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f007492964c125cb3e88a51ba2e50c3b44d33ae0'/>
<id>urn:sha1:f007492964c125cb3e88a51ba2e50c3b44d33ae0</id>
<content type='text'>
The kernel-doc script gets confused by __attribute__(()) strings in
structures, so just clean the out.  Also ignore the CRYPTO_MINALIGN_ATTR
macro used in the crypto subsystem.

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc Allow struct arguments documentation in struct body</title>
<updated>2015-08-06T19:05:35+00:00</updated>
<author>
<name>Danilo Cesar Lemes de Paula</name>
<email>danilo.cesar@collabora.co.uk</email>
</author>
<published>2015-08-04T12:04:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a4c6ebede2f99fc3aaa5a42228a16747d0aa2504'/>
<id>urn:sha1:a4c6ebede2f99fc3aaa5a42228a16747d0aa2504</id>
<content type='text'>
Describing arguments at top of a struct definition works fine
for small/medium size structs, but it definitely doesn't work well
for struct with a huge list of elements.

Keeping the arguments list inside the struct body makes it easier
to maintain the documentation.
ie:
/**
 * struct my_struct - short description
 * @a: first member
 * @b: second member
 *
 * Longer description
 */
struct my_struct {
    int a;
    int b;
    /**
     * @c: This is longer description of C
     *
     * You can use paragraphs to describe arguments
     * using this method.
     */
    int c;
};

This patch allows the use of this kind of syntax. Only one argument
per comment and user can use how many paragraphs he needs. It should
start with /**, which is already being used by kernel-doc. If those
comment doesn't follow those rules, it will be ignored.

Signed-off-by: Danilo Cesar Lemes de Paula &lt;danilo.cesar@collabora.co.uk&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Stephan Mueller &lt;smueller@chronox.de&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: intel-gfx &lt;intel-gfx@lists.freedesktop.org&gt;
Cc: dri-devel &lt;dri-devel@lists.freedesktop.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Use $KBUILD_BUILD_TIMESTAMP as man page date</title>
<updated>2015-07-10T17:03:25+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2015-07-08T19:07:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b2c4105b080fb26d8fc9b89c846f5966137c6d40'/>
<id>urn:sha1:b2c4105b080fb26d8fc9b89c846f5966137c6d40</id>
<content type='text'>
Together with the preceding changes, this allows man pages to be built
reproducibly.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: parse kernel-doc deterministically</title>
<updated>2015-07-10T17:03:05+00:00</updated>
<author>
<name>Jérémy Bobbio</name>
<email>lunar@debian.org</email>
</author>
<published>2015-07-08T19:06:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2e106e4df28aa264f9ded7e5be3733224f2e4f93'/>
<id>urn:sha1:2e106e4df28aa264f9ded7e5be3733224f2e4f93</id>
<content type='text'>
Regular expressions for highlights in kernel-doc are stored in a Perl
hash.  These hashes are ordered differently for each Perl run. This will
prevent kernel-doc to behave deterministically when parsing “@foo()” as
in some runs it will be interpreted as a parameter and in the others it
will be interpreted as a function.

We now sort the %highlights hash to get the same behavior on every run.

Signed-off-by: Jérémy Bobbio &lt;lunar@debian.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: don't eat struct members with __aligned</title>
<updated>2014-12-11T01:41:02+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-12-10T23:41:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7b990789a4c3420fa57596b368733158e432d444'/>
<id>urn:sha1:7b990789a4c3420fa57596b368733158e432d444</id>
<content type='text'>
The change from \d+ to .+ inside __aligned() means that the following
structure:

  struct test {
        u8 a __aligned(2);
        u8 b __aligned(2);
  };

essentially gets modified to

  struct test {
        u8 a;
  };

for purposes of kernel-doc, thus dropping a struct member, which in
turns causes warnings and invalid kernel-doc generation.

Fix this by replacing the catch-all (".") with anything that's not a
semicolon ("[^;]").

Fixes: 9dc30918b23f ("scripts/kernel-doc: handle struct member __aligned without numbers")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Cc: Nishanth Menon &lt;nm@ti.com&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: recognize __meminit</title>
<updated>2014-08-26T20:49:57+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2014-08-25T01:17:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=270a00963cd367214e92e6deadb3bde65b49b16a'/>
<id>urn:sha1:270a00963cd367214e92e6deadb3bde65b49b16a</id>
<content type='text'>
Fix scripts/kernel-doc to recognize __meminit in a function prototype
and to strip it, as done with many other attributes.

Fixes this warning:

  Warning(..//mm/page_alloc.c:2973): cannot understand function prototype: 'void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) '

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
