aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-10-25 20:06:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-26 19:32:09 -0400
commit890c78c2d681a8dc89c78eb9177990cad3a77dc3 (patch)
tree1d3b6ba606a5c029f6442bd89213147010c6ba5c /scripts/kernel-doc
parent7eea5b897eb6bbb79d7e6e398f4fbb61fcee57c7 (diff)
kernel-doc: allow more whitespace in macros
Allow macros that are annotated with kernel-doc to contain whitespace between the '#' and "define". It's valid and being used, so allow it. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 44ee94d2ab76..a53e2fc8dfb5 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1648,7 +1648,7 @@ sub dump_function($$) {
1648 $prototype =~ s/^noinline +//; 1648 $prototype =~ s/^noinline +//;
1649 $prototype =~ s/__devinit +//; 1649 $prototype =~ s/__devinit +//;
1650 $prototype =~ s/__init +//; 1650 $prototype =~ s/__init +//;
1651 $prototype =~ s/^#define\s+//; #ak added 1651 $prototype =~ s/^#\s*define\s+//; #ak added
1652 $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; 1652 $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
1653 1653
1654 # Yes, this truly is vile. We are looking for: 1654 # Yes, this truly is vile. We are looking for:
@@ -1764,13 +1764,13 @@ sub process_state3_function($$) {
1764 1764
1765 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line 1765 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1766 1766
1767 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) { 1767 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#\s*define/)) {
1768 # do nothing 1768 # do nothing
1769 } 1769 }
1770 elsif ($x =~ /([^\{]*)/) { 1770 elsif ($x =~ /([^\{]*)/) {
1771 $prototype .= $1; 1771 $prototype .= $1;
1772 } 1772 }
1773 if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) { 1773 if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) {
1774 $prototype =~ s@/\*.*?\*/@@gos; # strip comments. 1774 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
1775 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. 1775 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1776 $prototype =~ s@^\s+@@gos; # strip leading spaces 1776 $prototype =~ s@^\s+@@gos; # strip leading spaces