All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] kernel/gcov/fs.c : replace kcalloc(1... with kzalloc
@ 2015-06-15 10:29 Maninder Singh
  0 siblings, 0 replies; only message in thread
From: Maninder Singh @ 2015-06-15 10:29 UTC (permalink / raw)
  To: oberpar, linux-kernel

Use kzalloc rather than kcalloc(1,...) for allocating one thing.

The semantic patch that makes this change is as follows:

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>


Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
---
 kernel/gcov/fs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index edf67c4..b31701a 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -437,7 +437,7 @@ static struct gcov_node *new_node(struct gcov_node
*parent,
 	if (!node)
 		goto err_nomem;
 	if (info) {
-		node->loaded_info = kcalloc(1, sizeof(struct gcov_info *),
+		node->loaded_info = kzalloc(sizeof(struct gcov_info *),
 					   GFP_KERNEL);
 		if (!node->loaded_info)
 			goto err_nomem;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-15 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-15 10:29 [PATCH 1/1] kernel/gcov/fs.c : replace kcalloc(1... with kzalloc Maninder Singh

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.