All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Update alignment check
@ 2012-06-13 18:50 Joe Perches
  2012-07-26  9:08 ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2012-06-13 18:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andy Whitcroft, LKML

Parenthesis alignment doesn't correctly check an existing line
after an inserted or modified line with an open parenthesis.

Fix it.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e5bd60f..630319a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1848,8 +1848,8 @@ sub process {
 
 			my $pos = pos_last_openparen($rest);
 			if ($pos >= 0) {
-				$line =~ /^\+([ \t]*)/;
-				my $newindent = $1;
+				$line =~ /^(\+| )([ \t]*)/;
+				my $newindent = $2;
 
 				my $goodtabindent = $oldindent .
 					"\t" x ($pos / 8) .



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkpatch: Update alignment check
  2012-06-13 18:50 [PATCH] checkpatch: Update alignment check Joe Perches
@ 2012-07-26  9:08 ` Paul Walmsley
  2012-07-26 14:15   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2012-07-26  9:08 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches; +Cc: Andrew Morton, LKML

Hi Andy, Joe,

On Wed, 13 Jun 2012, Joe Perches wrote:

> Parenthesis alignment doesn't correctly check an existing line
> after an inserted or modified line with an open parenthesis.
> 
> Fix it.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Reviewed-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Paul Walmsley <paul@pwsan.com>

This fixes some bogus checkpatch warnings here.  Andy, any chance this 
patch can make it in for 3.6-rc?

> ---
>  scripts/checkpatch.pl |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index e5bd60f..630319a 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1848,8 +1848,8 @@ sub process {
>  
>  			my $pos = pos_last_openparen($rest);
>  			if ($pos >= 0) {
> -				$line =~ /^\+([ \t]*)/;
> -				my $newindent = $1;
> +				$line =~ /^(\+| )([ \t]*)/;
> +				my $newindent = $2;
>  
>  				my $goodtabindent = $oldindent .
>  					"\t" x ($pos / 8) .
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


- Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkpatch: Update alignment check
  2012-07-26  9:08 ` Paul Walmsley
@ 2012-07-26 14:15   ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2012-07-26 14:15 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: Andy Whitcroft, Andrew Morton, LKML

On Thu, 2012-07-26 at 03:08 -0600, Paul Walmsley wrote:
> On Wed, 13 Jun 2012, Joe Perches wrote:
> > Parenthesis alignment doesn't correctly check an existing line
> > after an inserted or modified line with an open parenthesis.
[]
> This fixes some bogus checkpatch warnings here.  Andy, any chance this 
> patch can make it in for 3.6-rc?

That's pretty likely.

It's been in Andrew Morton's -mm and -next for awhile.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-26 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 18:50 [PATCH] checkpatch: Update alignment check Joe Perches
2012-07-26  9:08 ` Paul Walmsley
2012-07-26 14:15   ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.