浏览代码

checkpatch: make utf-8 test --strict

Some patches are sent in using ISO-8859 or even Windows codepage 1252.

Make checkpatch accept these by default and only emit the "Invalid UTF-8"
message when using --strict.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches 14 年之前
父节点
当前提交
34d9921972
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      scripts/checkpatch.pl

+ 2 - 2
scripts/checkpatch.pl

@@ -1609,8 +1609,8 @@ sub process {
 			my $ptr = substr($blank, 0, length($utf8_prefix)) . "^";
 			my $hereptr = "$hereline$ptr\n";
 
-			ERROR("INVALID_UTF8",
-			      "Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr);
+			CHK("INVALID_UTF8",
+			    "Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr);
 		}
 
 # ignore non-hunk lines and lines being removed