lkml.org 
[lkml]   [2013]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] kernel-doc: Update script to find more "Return:" sections
From
Date
Many kernel-doc return description sections headers
use variants of the "Return:" section prefix.

(some or maybe even most of these aren't in
kernel-doc sections, but many are)

$ git grep -E -i "^\s*\*\s*return[s]?:"| \
cut -f2- -d":" | awk '{print $1 $2}' | \
sort | uniq -c
121 *return:
838 *Return:
778 *RETURN:
191 *returns:
1965 *Returns:
603 *RETURNS:

Rather than change all of the variants to the
canonical "Return:", adapt the script to accept
case insensitive "Return:" and "Returns:"

Signed-off-by: Joe Perches <joe@perches.com>
---

I don't know that this actually works.
It does seem right though.

Randy? Rob? Can you test this please?

scripts/kernel-doc | 1 +
1 file changed, 1 insertion(+)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 4305b2f..2b96411 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -418,6 +418,7 @@ sub dump_section {
$parameterdescs{$name} = $contents;
$sectcheck = $sectcheck . $name . " ";
} else {
+ $name = "Return" if $name =~ /^return[s]?$/i;
# print STDERR "other section '$name' = '$contents'\n";
if (defined($sections{$name}) && ($sections{$name} ne "")) {
print STDERR "Error(${file}:$.): duplicate section name '$name'\n";



\
 
 \ /
  Last update: 2013-09-04 03:01    [W:0.137 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site