From 15160f90b8640b7d83ec8cdac64c65403355faa6 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 10 Dec 2014 15:51:40 -0800 Subject: 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 Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d94f5d8..10ad5ab 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4446,7 +4446,7 @@ sub process { my $expr = '\s*\(\s*' . quotemeta($1) . '\s*\)\s*;'; if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?)$expr/) { 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); } } -- cgit v0.10.2