]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
checkpatch: improve warning message for "needless if" case
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 10 Dec 2014 23:51:40 +0000 (15:51 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:11 +0000 (17:41 -0800)
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>
scripts/checkpatch.pl

index d94f5d879fb1311b81aca53599e5deb439e708a7..10ad5ab571dc6a5b07c7c41383075a9f601a342f 100755 (executable)
@@ -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);
                        }
                }