On Wed, 2013-04-10 at 10:49 +0200, Matthijs Kooijman wrote:
> This check was intended to catch extra newlines at the end of a function
> definition, but it would trigger on any closing brace, including those
> of inline functions and macro definitions, triggering false positives.
> Now, only closing braces on a line by themselves trigger this check.
[]
> Signed-off-by: Matthijs Kooijman <matth...@stdin.nl>

Acked-by: Joe Perches <j...@perches.com>

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 532c41b..f962c30 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3236,7 +3236,7 @@ sub process {
>               }
>  
>  # check for unnecessary blank lines around braces
> -             if (($line =~ /^..*}\s*$/ && $prevline =~ /^.\s*$/)) {
> +             if (($line =~ /^.\s*}\s*$/ && $prevline =~ /^.\s*$/)) {
>                       CHK("BRACES",
>                           "Blank lines aren't necessary before a close brace 
> '}'\n" . $hereprev);
>               }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to