[PATCH] kernel-doc: Allow whitespace before comment start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is some existing documentation that is formatted with some
indent at the beginning (like one in include/kunit/visibility.h).

However, such notation is not recognized by the script and attempt
to include that in kernel documentation fails with:

../include/kunit/visibility.h:1: warning: no structured comments found

Change the doc_start regex to also match /** with some whitespaces
at beginning of the line.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
---
Cc: Jonathan Corbet <corbet@xxxxxxx>
Cc: Rae Moar <rmoar@xxxxxxxxxx>
---
 scripts/kernel-doc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 2791f8195203..6f91b26d63b6 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -246,7 +246,7 @@ my $decl_type;
 # Name of the kernel-doc identifier for non-DOC markups
 my $identifier;
 
-my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
+my $doc_start = '^[ \t]*/\*\*\s*$'; # Allow whitespace before and at end of comment start.
 my $doc_end = '\*/';
 my $doc_com = '\s*\*\s*';
 my $doc_com_body = '\s*\* ?';
-- 
2.43.0





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux