Re: [PATCH] checkpatch: Report missing spaces around trigraphs with--strict

From: Josh Triplett
Date: Mon Sep 02 2013 - 19:15:41 EST


On Mon, Sep 02, 2013 at 03:14:46PM -0700, Joe Perches wrote:
> Spaces around trigraphs are specified by CodingStyle
> but checkpatch is currently silent about them because
> there are many current instances without them.
>
> Make missing spaces around trigraphs a --strict message.
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>

> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2817,7 +2817,7 @@ sub process {
> \+=|-=|\*=|\/=|%=|\^=|\|=|&=|
> =>|->|<<|>>|<|>|=|!|~|
> &&|\|\||,|\^|\+\+|--|&|\||\+|-|\*|\/|%|
> - \?|:
> + \?:|\?|:
> }x;

While you're poking at this bit of code, would you mind looking at why
it gives a false positive for spaces around '*' on my recent patch at
20130901234251.GB25057@leaf">http://mid.gmane.org/20130901234251.GB25057@leaf ? It appears to
mistake the '*' of a pointer for a multiply.

Thanks,
Josh Triplett
--
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/