mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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:
parent
1b135431ab
commit
c376222960
39 changed files with 48 additions and 103 deletions
|
|
@ -37,11 +37,10 @@ static struct sysfs_dirent * __sysfs_new_dirent(void * element)
|
|||
{
|
||||
struct sysfs_dirent * sd;
|
||||
|
||||
sd = kmem_cache_alloc(sysfs_dir_cachep, GFP_KERNEL);
|
||||
sd = kmem_cache_zalloc(sysfs_dir_cachep, GFP_KERNEL);
|
||||
if (!sd)
|
||||
return NULL;
|
||||
|
||||
memset(sd, 0, sizeof(*sd));
|
||||
atomic_set(&sd->s_count, 1);
|
||||
atomic_set(&sd->s_event, 1);
|
||||
INIT_LIST_HEAD(&sd->s_children);
|
||||
|
|
|
|||
Loading…
Reference in a new issue