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
24072407
24082408 if ($rawline=~/^\+\+\+\s+(\S+)/) {
24092409 $setup_docs = 0;
2410− if ($1 =~ m@Documentation/admin-guide/kernel-parameters.rst$@) {
2410+ if ($1 =~ m@Documentation/admin-guide/kernel-parameters.txt$@) {
24112411 $setup_docs = 1;
24122412 }
24132413 #next;
@@ -6388,7 +6388,7 @@ sub process { · 3974 unmodified lines
63886388
63896389 if (!grep(/$name/, @setup_docs)) {
63906390 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);
63926392 }
63936393 }
63946394