History

checkpatch: correct check for kernel parameters doc

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.

Tim Froidcoeur committed 6 years ago

Commit 2581ac71 parent 8301c711 file · +2 −2Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+2−2
@@ -2407,7 +2407,7 @@ sub process { · 2406 unmodified lines
2407 2407
2408 if ($rawline=~/^\+\+\+\s+(\S+)/) {2408 if ($rawline=~/^\+\+\+\s+(\S+)/) {
2409 $setup_docs = 0;2409 $setup_docs = 0;
2410 if ($1 =~ m@Documentation/admin-guide/kernel-parameters.rst$@) {2410 if ($1 =~ m@Documentation/admin-guide/kernel-parameters.txt$@) {
2411 $setup_docs = 1;2411 $setup_docs = 1;
2412 }2412 }
2413 #next;2413 #next;
@@ -6388,7 +6388,7 @@ sub process { · 3974 unmodified lines
6388 6388
6389 if (!grep(/$name/, @setup_docs)) {6389 if (!grep(/$name/, @setup_docs)) {
6390 CHK("UNDOCUMENTED_SETUP",6390 CHK("UNDOCUMENTED_SETUP",
6391 "__setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.rst\n" . $herecurr);6391 "__setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.txt\n" . $herecurr);
6392 }6392 }
6393 }6393 }
6394 6394