From: Joe Perches <joe@perches.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
apw@canonical.com, dwaipayanray1@gmail.com,
lukas.bulwahn@gmail.com
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test
Date: Fri, 16 Apr 2021 10:03:52 -0700 [thread overview]
Message-ID: <698f8bef0fccd425a0f8d1928bc05dfc13787bbe.camel@perches.com> (raw)
In-Reply-To: <ec273f46-6709-a1cd-7871-1e1d67fab7dd@wanadoo.fr>
On Fri, 2021-04-16 at 18:51 +0200, Christophe JAILLET wrote:
> Le 16/04/2021 à 18:11, Joe Perches a écrit :
> > On Fri, 2021-04-16 at 17:58 +0200, Christophe JAILLET wrote:
> > > The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested
> > > Add the corresponding check.
> > []
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > []
> > > @@ -7006,9 +7006,9 @@ sub process {
> > > }
> > >
> > >
> > >
> > > # check for alloc argument mismatch
> > > - if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
> > > + if ($line =~ /\b(devm_|)(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
> >
> > Perhaps nicer using
> I'll send a V2.
>
> Thx for the feedback.
>
> CJ
>
> >
> > if ($line =~ /\b((?:devm_)?(?:kcalloc|kmalloc_array))\s*\*\s*sizeof\b/) {
The \* above should be \(.
I can't type and apparently I don't proofread either.
I offer the excuse that the * and ( are adjacent on my keyboard...
cheers, Joe
next prev parent reply other threads:[~2021-04-16 17:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 15:58 Christophe JAILLET
2021-04-16 16:11 ` Joe Perches
2021-04-16 16:51 ` Christophe JAILLET
2021-04-16 17:03 ` Joe Perches [this message]
2021-04-16 18:03 ` Christophe JAILLET
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=698f8bef0fccd425a0f8d1928bc05dfc13787bbe.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dwaipayanray1@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.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®