Skip to content

Commit

Permalink
[PATCH] kernel-doc: allow a little whitespace
Browse files Browse the repository at this point in the history
In kernel-doc syntax, be a little flexible:  allow whitespace between
a function parameter name and the colon that must follow it, such as:
	@pdev : PCI device to unplug

(This allows lots of megaraid kernel-doc to work without tons of
editing.)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
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 Feb 11, 2007
1 parent 3de3af1 commit 891dcd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/kernel-doc-nano-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The format of the block comment is like this:

/**
* function_name(:)? (- short description)?
(* @parameterx: (description of parameter x)?)*
(* @parameterx(space)*: (description of parameter x)?)*
(* a blank line)?
* (Description:)? (Description of function)?
* (section header: (section description)? )*
Expand Down
4 changes: 2 additions & 2 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ use strict;
# * my_function
# **/
#
# If the Description: header tag is ommitted, then there must be a blank line
# If the Description: header tag is omitted, then there must be a blank line
# after the last parameter specification.
# e.g.
# /**
Expand Down Expand Up @@ -265,7 +265,7 @@ my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
my $doc_end = '\*/';
my $doc_com = '\s*\*\s*';
my $doc_decl = $doc_com.'(\w+)';
my $doc_sect = $doc_com.'(['.$doc_special.']?[\w ]+):(.*)';
my $doc_sect = $doc_com.'(['.$doc_special.']?[\w\s]+):(.*)';
my $doc_content = $doc_com.'(.*)';
my $doc_block = $doc_com.'DOC:\s*(.*)?';

Expand Down

0 comments on commit 891dcd2

Please sign in to comment.