From: Julia Lawall <julia.lawall@inria.fr>
To: Alex Dewar <alex.dewar@gmx.co.uk>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
Michal Marek <michal.lkml@markovi.net>,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>,
Allison Randal <allison@lohutok.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Coccinelle: zalloc_simple: Fix patch mode for dma_alloc_coherent()
Date: Mon, 6 Apr 2020 21:15:29 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.2004062115000.10239@hadrien> (raw)
In-Reply-To: <20200403173011.65511-1-alex.dewar@gmx.co.uk>
On Fri, 3 Apr 2020, Alex Dewar wrote:
> Commit dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()"), in
> removing dma_zalloc_coherent() treewide, inadvertently removed the patch
> rule for dma_alloc_coherent(), leaving Coccinelle unable to auto-generate
> patches for this case. Fix this.
>
> Fixes: dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()")
> CC: Luis Chamberlain <mcgrof@kernel.org>
> Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk>
> ---
> scripts/coccinelle/api/alloc/zalloc-simple.cocci | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
> index 26cda3f48f01..c53aab7fe096 100644
> --- a/scripts/coccinelle/api/alloc/zalloc-simple.cocci
> +++ b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
> @@ -70,6 +70,15 @@ statement S;
> - x = (T)vmalloc(E1);
> + x = (T)vzalloc(E1);
> |
> +- x = dma_alloc_coherent(E2,E1,E3,E4);
> ++ x = dma_alloc_coherent(E2,E1,E3,E4);
Hi,
I don't understand the above case. The before and after code seem to be
the same?
julia
> +|
> +- x = (T *)dma_alloc_coherent(E2,E1,E3,E4);
> ++ x = dma_alloc_coherent(E2,E1,E3,E4);
> +|
> +- x = (T)dma_alloc_coherent(E2,E1,E3,E4);
> ++ x = (T)dma_alloc_coherent(E2,E1,E3,E4);
> +|
> - x = kmalloc_node(E1,E2,E3);
> + x = kzalloc_node(E1,E2,E3);
> |
> --
> 2.26.0
>
>
next prev parent reply other threads:[~2020-04-06 19:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 17:30 [PATCH] Coccinelle: zalloc_simple: Fix patch mode for dma_alloc_coherent() Alex Dewar
2020-04-06 19:15 ` Julia Lawall [this message]
2020-04-07 15:37 ` Alex Dewar
2020-04-07 15:50 ` Alex Dewar
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=alpine.DEB.2.21.2004062115000.10239@hadrien \
--to=julia.lawall@inria.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=alex.dewar@gmx.co.uk \
--cc=allison@lohutok.net \
--cc=cocci@systeme.lip6.fr \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=tglx@linutronix.de \
/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