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

From: Joe Perches
Date: Fri Jul 08 2011 - 19:01:55 EST


On Fri, 2011-07-08 at 17:41 -0400, Pavel Roskin wrote:
> 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);

Hey Pavel.

This should probably not be an elsif but
a standalone test.

Also, there's an upcoming patch in mm that
classifies all output ERROR/WARN/CHK types.

This one should be "SPACING".

https://lkml.org/lkml/2011/6/21/256

http://userweb.kernel.org/~akpm/mmotm/broken-out/checkpatchpl-add-ability-to-ignore-various-messages.patch


--
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/