[PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc().

Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
corresponding "kmem_cache_zalloc()" call.

Signed-off-by: Robert P. J. Day <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Roland McGrath <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Greg KH <[email protected]>
Acked-by: Joel Becker <[email protected]>
Cc: Steven Whitehouse <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Michael Halcrow <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: James Morris <[email protected]>
Cc: Chris Wright <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Robert P. J. Day 2007-02-10 01:45:03 -08:00 • committed by Linus Torvalds
commit c376222960
39 changed files with 48 additions and 103 deletions

View file

@ -593,12 +593,10 @@ create:
replace:
err = -ENOBUFS;
new_f = kmem_cache_alloc(dn_hash_kmem, GFP_KERNEL);
new_f = kmem_cache_zalloc(dn_hash_kmem, GFP_KERNEL);
if (new_f == NULL)
goto out;
memset(new_f, 0, sizeof(struct dn_fib_node));
new_f->fn_key = key;
new_f->fn_type = type;
new_f->fn_scope = r->rtm_scope;