[PATCH] checkpatch: suggest spaces around binary operators instrict mode

From: Pavel Roskin
Date: Fri Jul 08 2011 - 17:42:17 EST


Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---
scripts/checkpatch.pl | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b0aa2c6..9431ada 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2167,6 +2167,8 @@ sub process {
if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) {
ERROR("need consistent spacing around '$op' $at\n" .
$hereptr);
+ } elsif ($ctx =~ /[^WCE]x[^WCE]/) {
+ CHK("spaces suggested around '$op' $at\n" . $hereptr);
}

# A colon needs no spaces before when it is
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/