Commit 15160f90 authored by Fabio Estevam's avatar Fabio Estevam Committed by 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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment