Skip to contentSkip to conversation

kernel/gcov/fs.c : replace kcalloc(1... with kzalloc

PATCH New Maninder Singh 1 participant 1 message Jun 15, 2015 Gcov based kernel profiling

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/gcov/fs.c : replace kcalloc(1... with kzalloc

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>

---
 kernel/gcov/fs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/gcov/fs.c +0 -0
index edf67c4..b31701a 100644
@@ -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;

Signature · 1 line
1.7.1