From: Sergey Dyasly <dserrg@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH] checkpatch: add check for the buggy while_each_thread()
Date: Wed, 21 Jan 2015 19:35:59 +0300 [thread overview]
Message-ID: <20150121193559.a45b6555b21bee3f627930f8@gmail.com> (raw)
In-Reply-To: <1421630853.29879.10.camel@perches.com>
On Sun, 18 Jan 2015 17:27:33 -0800
Joe Perches <joe@perches.com> wrote:
> On Sun, 2015-01-18 at 17:24 +0300, Sergey Dyasly wrote:
> > Now it's preferable to use for_each_thread() instead of while_each_thread().
> > Add a check to checkpatch.pl in order to prevent any new usages of the buggy
> > while_each_thread() when possible.
> []
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -3255,6 +3255,12 @@ sub process {
> > "Prefer dev_$level(... to dev_printk(KERN_$orig, ...\n" . $herecurr);
> > }
> >
> > +# Check for the buggy while_each_thread()
> > + if ($line =~ /\bwhile_each_thread\(/) {
>
> \bwhile_each_thread\s*\(
> or maybe
> \bwhile_each_thread\b
>
> > + WARN("WHILE_EACH_THREAD",
> > + "Prefer to use for_each_thread() instead of the buggy while_each_thread(). See commit 0c740d0afc3bff0a097ad03a1c8df92757516f5c for details.\n" . $herecurr);
>
> Pretty long commit id, 12 is probably enough.
"\bwhile_each_thread\s*\(" and 12-digit commit id sound reasonable, thanks.
I'll update the patch.
--
Sergey Dyasly <dserrg@gmail.com>
prev parent reply other threads:[~2015-01-21 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 14:24 Sergey Dyasly
2015-01-19 1:27 ` Joe Perches
2015-01-21 16:35 ` Sergey Dyasly [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=20150121193559.a45b6555b21bee3f627930f8@gmail.com \
--to=dserrg@gmail.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.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
all inboxes | Powered by JetHome®