lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] checkpatch: extend line continuation test
Date
On Friday, November 16, 2012 3:21 PM, Joe Perches wrote
>
> Preprocessor directives and asm statements should be
> allowed to have a line continuation.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Hi Joe Perches,

It works properly. :)

Tested-by: Jingoo Han <jg1.han@samsung.com>


Best regards,
Jingoo Han

> ---
> scripts/checkpatch.pl | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d2d5ba1..019f9be 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3006,10 +3006,12 @@ sub process {
> }
> }
>
> -# check for line continuations outside of #defines
> +# check for line continuations outside of #defines, preprocessor #, and asm
>
> } else {
> if ($prevline !~ /^..*\\$/ &&
> + $line !~ /^\+\s*\#*.*\\$/ && # preprocessor
> + $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
> $line =~ /^\+.*\\$/) {
> WARN("LINE_CONTINUATIONS",
> "Avoid unnecessary line continuations\n" . $herecurr);




\
 
 \ /
  Last update: 2012-11-16 08:01    [W:0.048 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site