Skip to content

Commit

Permalink
kernel-doc: allow structs whose members are all private
Browse files Browse the repository at this point in the history
Struct members may be marked as private by using
	/* private: */
before them, as noted in Documentation/kernel-doc-nano-HOWTO.txt

Fix kernel-doc to handle structs whose members are all private;
otherwise invalid XML is generated:

xmlto: input does not validate (status 3)
linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml:146: element variablelist: validity error : Element variablelist content does not follow the DTD, expecting ((title , titleabbrev?)? , varlistentry+), got ()
Document linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml does not validate
make[1]: *** [Documentation/DocBook/debugobjects.html] Error 3

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reported-by: Roland McGrath <roland@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Sep 23, 2008
1 parent c32a162 commit 39f00c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ sub output_struct_xml(%) {
print " <refsect1>\n";
print " <title>Members</title>\n";

if ($#{$args{'parameterlist'}} >= 0) {
print " <variablelist>\n";
foreach $parameter (@{$args{'parameterlist'}}) {
($parameter =~ /^#/) && next;
Expand All @@ -798,6 +799,9 @@ sub output_struct_xml(%) {
print " </varlistentry>\n";
}
print " </variablelist>\n";
} else {
print " <para>\n None\n </para>\n";
}
print " </refsect1>\n";

output_section_xml(@_);
Expand Down

0 comments on commit 39f00c0

Please sign in to comment.