All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one
@ 2009-12-19  7:16 ` Julia Lawall
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

end of thread, other threads:[~2010-01-04  5:22 UTC | newest]

Thread overview: 6+ 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 Julia Lawall
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 ` [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only Divy Le Ray
2009-12-21 23:33   ` [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing Divy Le Ray
2010-01-04  5:22   ` [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only David Miller
2010-01-04  5:22     ` [PATCH 3/7] drivers/net/cxgb3: Use kzalloc for allocating only one thing David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.