From: Divy Le Ray <divy@chelsio.com>
To: Julia Lawall <julia@diku.dk>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing
Date: Mon, 21 Dec 2009 15:33:41 -0800 [thread overview]
Message-ID: <4B3005D5.9070608@chelsio.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0912190816340.30546@ask.diku.dk>
Julia Lawall wrote:
>
> From: Julia Lawall <julia@diku.dk>
>
> Use kzalloc rather than kcalloc(1,...)
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> @@
>
> - kcalloc(1,
> + kzalloc(
> ...)
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
>
Acked-by: Divy Le Ray <divy@chelsio.com>
>
> ---
> drivers/net/cxgb3/cxgb3_offload.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -u -p a/drivers/net/cxgb3/cxgb3_offload.c
> b/drivers/net/cxgb3/cxgb3_offload.c
> --- a/drivers/net/cxgb3/cxgb3_offload.c 2009-09-14 14:55:49.000000000
> +0200
> +++ b/drivers/net/cxgb3/cxgb3_offload.c 2009-12-19 07:52:52.000000000
> +0100
> @@ -1252,7 +1252,7 @@ int cxgb3_offload_activate(struct adapte
> struct mtutab mtutab;
> unsigned int l2t_capacity;
>
> - t = kcalloc(1, sizeof(*t), GFP_KERNEL);
> + t = kzalloc(sizeof(*t), GFP_KERNEL);
> if (!t)
> return -ENOMEM;
>
next prev parent reply other threads:[~2009-12-21 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-19 7:16 [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing Julia Lawall
2009-12-21 23:33 ` Divy Le Ray [this message]
2010-01-04 5:22 ` David Miller
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=4B3005D5.9070608@chelsio.com \
--to=divy@chelsio.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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