mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel-doc: allow structs whose members are all private
@ 2008-09-15 17:02 Randy Dunlap
  2008-09-15 17:26 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2008-09-15 17:02 UTC (permalink / raw)
  To: lkml; +Cc: akpm, samr, Roland McGrath, Christoph Hellwig

From: Randy Dunlap <randy.dunlap@oracle.com>

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>
---
 scripts/kernel-doc |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.27-rc6-git4.orig/scripts/kernel-doc
+++ linux-2.6.27-rc6-git4/scripts/kernel-doc
@@ -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;
@@ -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(@_);

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

* Re: [PATCH] kernel-doc: allow structs whose members are all private
  2008-09-15 17:02 [PATCH] kernel-doc: allow structs whose members are all private Randy Dunlap
@ 2008-09-15 17:26 ` Christoph Hellwig
  2008-09-15 17:31   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2008-09-15 17:26 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, akpm, samr, Roland McGrath, Christoph Hellwig

On Mon, Sep 15, 2008 at 10:02:29AM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Fix kernel-doc to handle structs whose members are all private;
> otherwise invalid XML is generated:

What's supposed to be a private member? 


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

* Re: [PATCH] kernel-doc: allow structs whose members are all private
  2008-09-15 17:26 ` Christoph Hellwig
@ 2008-09-15 17:31   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2008-09-15 17:31 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: lkml, akpm, samr, Roland McGrath

On Mon, 15 Sep 2008 13:26:48 -0400 Christoph Hellwig wrote:

> On Mon, Sep 15, 2008 at 10:02:29AM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Fix kernel-doc to handle structs whose members are all private;
> > otherwise invalid XML is generated:
> 
> What's supposed to be a private member? 

Struct members may be marked as private by using
	/* private: */
before them, as noted in Documentation/kernel-doc-nano-HOWTO.txt:

<quote>
Inside a struct description, you can use the "private:" and "public:"
comment tags.  Structure fields that are inside a "private:" area
are not listed in the generated output documentation.

Example:

/**
 * struct my_struct - short description
 * @a: first member
 * @b: second member
 *
 * Longer description
 */
struct my_struct {
    int a;
    int b;
/* private: */
    int c;
};
</quote>


---
~Randy

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

end of thread, other threads:[~2008-09-15 17:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-15 17:02 [PATCH] kernel-doc: allow structs whose members are all private Randy Dunlap
2008-09-15 17:26 ` Christoph Hellwig
2008-09-15 17:31   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®