diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f8343b34a28b91..62939f5800cfc0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3785,7 +3785,9 @@ sub process { } # check for embedded filenames - if ($rawline =~ /^\+.*\b\Q$realfile\E\b/) { + if ($rawline =~ /^\+.*\b\Q$realfile\E\b/ && + $realfile !~ /Kconfig.*/ && + $realfile !~ /Makefile.*/) { WARN("EMBEDDED_FILENAME", "It's generally not useful to have the filename in the file\n" . $herecurr); }