提交 15160f90 编写于 作者: F Fabio Estevam 提交者: Linus Torvalds

checkpatch: improve warning message for "needless if" case

Add an 'and' to the sentence so that it looks better:

  WARNING: debugfs_remove(NULL) is safe and this check is probably not required
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 04941aa7
...@@ -4446,7 +4446,7 @@ sub process { ...@@ -4446,7 +4446,7 @@ sub process {
my $expr = '\s*\(\s*' . quotemeta($1) . '\s*\)\s*;'; my $expr = '\s*\(\s*' . quotemeta($1) . '\s*\)\s*;';
if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?)$expr/) { if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?)$expr/) {
WARN('NEEDLESS_IF', WARN('NEEDLESS_IF',
"$1(NULL) is safe this check is probably not required\n" . $hereprev); "$1(NULL) is safe and this check is probably not required\n" . $hereprev);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册