mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Joe Perches <joe@perches.com>,
	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 20:03:53 +0200	[thread overview]
Message-ID: <9f1339ba-624c-9975-cd7e-d8fcab1da158@wanadoo.fr> (raw)
In-Reply-To: <698f8bef0fccd425a0f8d1928bc05dfc13787bbe.camel@perches.com>

Le 16/04/2021 à 19:03, Joe Perches a écrit :
> 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 \(.
> 

Yes I've seen it when I tested the updated test case.

> I can't type and apparently I don't proofread either.
> I offer the excuse that the * and ( are adjacent on my keyboard...
> 

Well, you should try with a French keyboard :)
Anyway, thanks for taking time for the update.

CJ

> cheers, Joe
> 
> 
> 


      reply	other threads:[~2021-04-16 18: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
2021-04-16 18:03       ` Christophe JAILLET [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=9f1339ba-624c-9975-cd7e-d8fcab1da158@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.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®