summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2009-04-30 15:08:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-02 15:36:10 -0700
commit52dc5aec9fe2eb591f1490278ae767448860118b (patch)
treee25afe95ef284448f65c7dbb6fb77323bd294e5f /scripts/kernel-doc
parent00a62ce91e554198ef28234c91c36f850f5a3bc9 (diff)
downloadop-kernel-dev-52dc5aec9fe2eb591f1490278ae767448860118b.zip
op-kernel-dev-52dc5aec9fe2eb591f1490278ae767448860118b.tar.gz
kernel-doc: restrict syntax for private: and public:
scripts/kernel-doc can (incorrectly) delete struct members that are surrounded by /* ... */ <struct members> /* ... */ if there is a /* private: */ comment in there somewhere also. Fix that by making the "/* private:" only allow whitespace between /* and "private:", not anything/everything in the world. This fixes some erroneous kernel-doc warnings that popped up while processing include/linux/usb/composite.h. 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>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 0f11870..3208a3a 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1411,7 +1411,8 @@ sub dump_struct($$) {
my $file = shift;
my $nested;
- if ($x =~/(struct|union)\s+(\w+)\s*{(.*)}/) {
+ if ($x =~ /(struct|union)\s+(\w+)\s*{(.*)}/) {
+ #my $decl_type = $1;
$declaration_name = $2;
my $members = $3;
@@ -1420,8 +1421,8 @@ sub dump_struct($$) {
$nested = $1;
# ignore members marked private:
- $members =~ s/\/\*.*?private:.*?public:.*?\*\///gos;
- $members =~ s/\/\*.*?private:.*//gos;
+ $members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gos;
+ $members =~ s/\/\*\s*private:.*//gos;
# strip comments:
$members =~ s/\/\*.*?\*\///gos;
$nested =~ s/\/\*.*?\*\///gos;
OpenPOWER on IntegriCloud