mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
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: Fabio Estevam <fabio.estevam@freescale.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
04941aa774
commit
15160f90b8
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue