Skip to content

Commit

Permalink
checkpatch: correct check for kernel parameters doc
Browse files Browse the repository at this point in the history
Adding a new kernel parameter with documentation makes checkpatch complain

  __setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.rst

The list of kernel parameters has moved to a separate txt file, but
checkpatch has not been updated for this.

Make checkpatch.pl look for the documentation for new kernel parameters
in kernel-parameters.txt instead of kernel-parameters.rst.

Fixes: e52347b ("Documentation/admin-guide: split the kernel parameter list to a separate file")
Signed-off-by: Tim Froidcoeur <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Joe Perches <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
TimFroidcoeur authored and torvalds committed Jun 11, 2020
1 parent 8301c71 commit 2581ac7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2407,7 +2407,7 @@ sub process {

if ($rawline=~/^\+\+\+\s+(\S+)/) {
$setup_docs = 0;
if ($1 =~ m@Documentation/admin-guide/kernel-parameters.rst$@) {
if ($1 =~ m@Documentation/admin-guide/kernel-parameters.txt$@) {
$setup_docs = 1;
}
#next;
Expand Down Expand Up @@ -6388,7 +6388,7 @@ sub process {

if (!grep(/$name/, @setup_docs)) {
CHK("UNDOCUMENTED_SETUP",
"__setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.rst\n" . $herecurr);
"__setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.txt\n" . $herecurr);
}
}

Expand Down

0 comments on commit 2581ac7

Please sign in to comment.