From: Michal Marek <mmarek@suse.com>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr,
nicolas.palix@imag.fr, cocci@systeme.lip6.fr,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Coccinelle: Script to replace allocate and memcpy with zalloc functions
Date: Tue, 26 Jul 2016 22:50:05 +0200 [thread overview]
Message-ID: <5797CCFD.7020707@suse.com> (raw)
In-Reply-To: <20160723210034.GA19346@amitoj-Inspiron-3542>
Dne 23.7.2016 v 23:00 Amitoj Kaur Chawla napsal(a):
> This script finds instances of allocate and memcpy which can be
> replaced with a direct call to zalloc equivalent of a function.
>
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
> scripts/coccinelle/api/zalloc.cocci | 556 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 556 insertions(+)
> create mode 100644 scripts/coccinelle/api/zalloc.cocci
>
> diff --git a/scripts/coccinelle/api/zalloc.cocci b/scripts/coccinelle/api/zalloc.cocci
> new file mode 100644
> index 0000000..4f94e43
> --- /dev/null
> +++ b/scripts/coccinelle/api/zalloc.cocci
> @@ -0,0 +1,556 @@
> +/// Prefer zalloc functions instead of using allocate and memcpy.
s/memcpy/memset/ ? The actual spatch names the correct function.
Michal
prev parent reply other threads:[~2016-07-26 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-23 21:00 [PATCH] Coccinelle: Script to replace allocate and memcpy with zalloc functions Amitoj Kaur Chawla
2016-07-23 21:03 ` Julia Lawall
2016-07-26 20:50 ` Michal Marek [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=5797CCFD.7020707@suse.com \
--to=mmarek@suse.com \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=amitoj1606@gmail.com \
--cc=cocci@systeme.lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.palix@imag.fr \
/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;
as well as URLs for NNTP newsgroup(s).