[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1365706015.1929.32.camel@joe-AO722>
Date: Thu, 11 Apr 2013 11:46:55 -0700
From: Joe Perches <joe@...ches.com>
To: Matthijs Kooijman <matthijs@...in.nl>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Whitcroft <apw@...onical.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: Only warn for empty lines before closing
braces by themselves
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 <matthijs@...in.nl>
Acked-by: Joe Perches <joe@...ches.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists