* [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing
@ 2009-12-19 7:16 Julia Lawall
2009-12-21 23:33 ` Divy Le Ray
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2009-12-19 7:16 UTC (permalink / raw)
To: Divy Le Ray, netdev, linux-kernel, kernel-janitors
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>
---
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing
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
2010-01-04 5:22 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Divy Le Ray @ 2009-12-21 23:33 UTC (permalink / raw)
To: Julia Lawall; +Cc: netdev, linux-kernel, kernel-janitors
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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-04 5:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-01-04 5:22 ` David Miller
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).