From: Joe Perches <joe@perches.com>
To: Andy Whitcroft <apw@canonical.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg KH <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] checkpatch: Add for_each tests to indentation and brace tests
Date: Mon, 14 Jul 2014 01:18:28 -0700 [thread overview]
Message-ID: <1405325908.9132.42.camel@joe-AO725> (raw)
In-Reply-To: <20140714081352.GE3743@bark>
On Mon, 2014-07-14 at 09:13 +0100, Andy Whitcroft wrote:
> On Sat, Jul 12, 2014 at 10:33:54PM -0700, Joe Perches wrote:
> > All the various for_each loop macros were not tested for
> > trailing brace on the following lines and for bad indentation.
> >
> > Add them.
[]
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -2698,7 +2698,7 @@ sub process {
> >
> > # if/while/etc brace do not go on next line, unless defining a do while loop,
> > # or if that brace on the next line is for something else
> > - if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) {
> > + if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) {
>
> They way you end this first addition with |) converts it the (?:[a-z_]*)
> doesn't it? Were you intending to do (?:[a-z_]+_|) ?
I didn't think about it much.
It's the same thing no?
prev parent reply other threads:[~2014-07-14 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-12 23:08 checkpatch.pl misses list_for_each_entry() coding style issues Greg KH
2014-07-13 3:10 ` Joe Perches
2014-07-13 5:33 ` [PATCH] checkpatch: Add for_each tests to indentation and brace tests Joe Perches
2014-07-14 8:13 ` Andy Whitcroft
2014-07-14 8:18 ` Joe Perches [this message]
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=1405325908.9132.42.camel@joe-AO725 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®