kzalloc() conversion in Documentation/
Subsystems (2)
PATCH 1/1 kzalloc() conversion in Documentation/
hi,
this patch converts Documentation/ to kzalloc usage. Not tested.
Signed-off-by Eric Sesterhenn <[email protected]>
Documentation/filesystems/configfs/configfs_example.c renamed from Documentation/filesystems/configfs/configfs_example.c.orig +2 -6
@@ -268,12 +268,10 @@ static struct config_item *simple_childr {struct simple_child *simple_child; - simple_child =kmalloc (sizeof (struct simple_child ),GFP_KERNEL ); + simple_child =kzalloc (sizeof (struct simple_child ),GFP_KERNEL );if (!simple_child)return NULL ; -memset (simple_child,0 ,sizeof (struct simple_child )); -config_item_init_type_name (&simple_child->item, name, &simple_child_type);
@@ -353,13 +351,11 @@ static struct config_group *group_childr {struct simple_children *simple_children; - simple_children =kmalloc (sizeof (struct simple_children ), + simple_children =kzalloc (sizeof (struct simple_children ),GFP_KERNEL );if (!simple_children)return NULL ; -memset (simple_children,0 ,sizeof (struct simple_children )); -config_group_init_type_name (&simple_children->group, name, &simple_children_type);
Documentation/connector/cn_test.c renamed from Documentation/connector/cn_test.c.orig +1 -3
@@ -124,10 +124,8 @@ static void cn_test_timer_func(unsignedstruct cn_msg *m;char data[32 ]; - m =kmalloc (sizeof (*m) +sizeof (data),GFP_ATOMIC ); + m =kzalloc (sizeof (*m) +sizeof (data),GFP_ATOMIC );if (m) { -memset (m,0 ,sizeof (*m) +sizeof (data)); -memcpy (&m->id, &cn_test_id,sizeof (m->id)); m->seq = cn_test_timer_counter; m->len =sizeof (data);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors