Skip to content

Commit

Permalink
scripts: kernel-doc: Replace the usage function
Browse files Browse the repository at this point in the history
Aim: unified POD, user more satisfied, script better structured

You can see the results with:

$ scripts/kernel-doc -help

Signed-off-by: Tomasz Warniełło <tomasz.warniello@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Disliked-by: Akira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/20220218181628.1411551-10-tomasz.warniello@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Tomasz Warniełło authored and Jonathan Corbet committed Feb 24, 2022
1 parent 834cf6b commit 252b47d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ See Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax.
# 25/07/2012 - Added support for HTML5
# -- Dan Luedtke <mail@danrl.de>

sub usage {
my $message = <<"EOF";
Usage: $0 [OPTION ...] FILE ...
EOF
print $message;
exit 1;
}

#
# format of comments.
# In the following table, (...)? signifies optional structure.
Expand Down Expand Up @@ -468,7 +459,7 @@ while ($ARGV[0] =~ m/^--?(.*)/) {
} elsif ($cmd eq "Werror") {
$Werror = 1;
} elsif (($cmd eq "h") || ($cmd eq "help")) {
usage();
pod2usage(-exitval => 0, -verbose => 2);
} elsif ($cmd eq 'no-doc-sections') {
$no_doc_sections = 1;
} elsif ($cmd eq 'enable-lineno') {
Expand Down

0 comments on commit 252b47d

Please sign in to comment.