checkpatch: improve EMBEDDED_FILENAME test
[linux-2.6-block.git] / scripts / checkpatch.pl
index a2fc7d556126728127a8a43699b02007557f2054..bd44d12965c98e99042938880a17730c6dfac5c9 100755 (executable)
@@ -3751,7 +3751,7 @@ sub process {
                }
 
 # check for embedded filenames
-               if ($rawline =~ /^\+.*\Q$realfile\E/) {
+               if ($rawline =~ /^\+.*\b\Q$realfile\E\b/) {
                        WARN("EMBEDDED_FILENAME",
                             "It's generally not useful to have the filename in the file\n" . $herecurr);
                }