Re: [PATCH] fs: Convert kmalloc()+memset() combo to kzalloc().

2006-12-03 Thread Robert P. J. Day
On Sun, 3 Dec 2006, Alan wrote: > > if (!p) { > > - p = kmalloc(sizeof(*p), GFP_KERNEL); > > + p = kzalloc(sizeof(*p), GFP_KERNEL); > > if (!p) > > return -ENOMEM; > > file->private_data = p; > > } > > - memset(p, 0, sizeof(

Re: [PATCH] fs: Convert kmalloc()+memset() combo to kzalloc().

2006-12-03 Thread Jiri Slaby
Robert P. J. Day wrote: > Convert all obvious combinations of kmalloc()+memset() to single > kzalloc() in the fs/ directory. [snip] > diff --git a/fs/seq_file.c b/fs/seq_file.c > index 555b9ac..f85feba 100644 > --- a/fs/seq_file.c > +++ b/fs/seq_file.c > @@ -31,12 +31,11 @@ int seq_open(struct fi

Re: [PATCH] fs: Convert kmalloc()+memset() combo to kzalloc().

2006-12-03 Thread Alan
> if (!p) { > - p = kmalloc(sizeof(*p), GFP_KERNEL); > + p = kzalloc(sizeof(*p), GFP_KERNEL); > if (!p) > return -ENOMEM; > file->private_data = p; > } > - memset(p, 0, sizeof(*p)); > mutex_init(&p->lock

[PATCH] fs: Convert kmalloc()+memset() combo to kzalloc().

2006-12-03 Thread Robert P. J. Day
Convert all obvious combinations of kmalloc()+memset() to single kzalloc() in the fs/ directory. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> --- binfmt_elf_fdpic.c |3 +-- seq_file.c |3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/binfmt_elf_