The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Joe Perches'" <joe@perches.com>,
	"'Andrew Morton'" <akpm@linux-foundation.org>
Cc: "'Andy Whitcroft'" <apw@canonical.com>,
	peter@hurleysoftware.com, "'LKML'" <linux-kernel@vger.kernel.org>,
	"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH] checkpatch: extend line continuation test
Date: Fri, 16 Nov 2012 15:28:39 +0900	[thread overview]
Message-ID: <001e01cdc3c3$9d9e51d0$d8daf570$%han@samsung.com> (raw)
In-Reply-To: <1353046873.24310.30.camel@joe-AO722>

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);



  reply	other threads:[~2012-11-16  6:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20121030211530.09F1320004E@hpza10.eem.corp.google.com>
2012-11-16  6:21 ` [PATCH] checkpatch: extend line continuation test Joe Perches
2012-11-16  6:28   ` Jingoo Han [this message]
2012-11-16  7:02   ` Geert Uytterhoeven
2012-11-16  7:09     ` Joe Perches
2012-11-16 19:31   ` [PATCH V2] " Joe Perches
2012-11-19  1:06     ` Jingoo Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001e01cdc3c3$9d9e51d0$d8daf570$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox