mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@linux-foundation.org>
Subject: [PATCH v2] kernel-doc: handle spaces in array size
Date: Fri, 6 Apr 2007 17:53:25 -0700	[thread overview]
Message-ID: <20070406175325.4bb3c904.randy.dunlap@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0704070138350.22181@yvahk01.tjqt.qr>

From:	Jan Engelhardt <jengelh@linux01.gwdg.de>

Unfortunately, kernel-doc has problems with a struct field like this:
	uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE];

simply due to the spaces around the "+" sign, so drop all spaces inside
[...] so that parsing is done correctly (in some sense).

Warning(linux-2.6.20-git15/include/linux/mtd/nand.h:304): No description found for parameter 'NAND_MAX_OOBSIZE]'

This needs to sit in -mm for awhile to see if it has any adverse effects.

And yes, this is just a hack until kernel-doc learns to do better
parsing.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/kernel-doc |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-2.6.21-rc6.orig/scripts/kernel-doc
+++ linux-2.6.21-rc6/scripts/kernel-doc
@@ -1452,6 +1452,11 @@ sub create_parameterlist($$$) {
 	    $arg =~ s/\s*:\s*/:/g;
 	    $arg =~ s/\s*\[/\[/g;
 
+	    # no spaces inside [array size expression];
+	    # messes up split/pop/shift/unshift below;
+	    while ($arg =~ s/\[(.*)\s+(.*)\]/[$1$2]/) {
+	    }
+
 	    my @args = split('\s*,\s*', $arg);
 	    if ($args[0] =~ m/\*/) {
 		$args[0] =~ s/(\*+)\s*/ $1/;

  reply	other threads:[~2007-04-07  0:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-06 18:47 [PATCH] " Randy Dunlap
2007-04-06 19:24 ` Jan Engelhardt
2007-04-06 23:03   ` Randy Dunlap
2007-04-06 23:38     ` Jan Engelhardt
2007-04-07  0:53       ` Randy Dunlap [this message]
2007-04-07 15:04         ` [PATCH] kernel-doc: handle arrays with arithmetic expressions as initializers <was Re: [PATCH v2] kernel-doc: handle spaces in array size> Borislav Petkov
2007-04-07 18:26           ` Randy Dunlap
2007-04-07 18:27           ` [PATCH v3] kernel-doc: handle arrays with arithmetic expressions as initializers Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070406175325.4bb3c904.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome