On Mon, Feb 26, 2018 at 10:53:18AM +0800, Su Hang wrote:
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 1b4b812e28fa..10c138344fa9 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2353,7 +2353,8 @@ sub process {
>               }
>  
>  # check for missing bracing round if etc

Please fix the pre-existing typo in the comment:

s/round/around/

> -             if ($line =~ /(^.*)\bif\b/ && $line !~ /\#\s*if/) {
> +             if ($line =~ /(^.*)\b(for|while|if)\b/ &&
> +                     $line !~ /\#\s*(for|while|if)/) {

Please use (?:...) like most other cases in checkpatch.pl.  Perl
automatically assigns groups to $1, $2, etc with (...).  Using (?:...)
is preferred since it's faster and free of this side-effect.

Attachment: signature.asc
Description: PGP signature

Reply via email to