提交 dea33496 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

checkpatch: suppress errors triggered by short patch

When the last hunk of a patch is short it will trigger errors from
checkpatch:

    Use of uninitialized value in pattern match (m//)
	    at /usr/local/bin/checkpatch.pl line 394.
    Use of uninitialized value in concatenation (.) or string
	    at /usr/local/bin/checkpatch.pl line 397.
    Use of uninitialized value in pattern match (m//)

Avoid touching beyond the last line.  Reported by Julien Brunel.
Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
Cc: Julien Brunel <brunel@diku.dk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a1080bf8
......@@ -408,6 +408,7 @@ sub ctx_statement_block {
# context.
if ($off >= $len) {
for (; $remain > 0; $line++) {
last if (!defined $lines[$line]);
next if ($lines[$line] =~ /^-/);
$remain--;
$loff = $len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册