Re: [PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset

From: DaeSeok Youn
Date: Mon Mar 13 2017 - 21:16:02 EST

2017-03-14 2:54 GMT+09:00 Alan Cox <alan@xxxxxxxxxxxxxxx>:
> On Mon, 2017-03-13 at 19:54 +0900, Daeseok Youn wrote:
> > If the atomisp_kernel_zalloc() has "true" as a second parameter, it
> > tries to allocate zeroing memory from kmalloc(vmalloc) and memset.
> > But using kzalloc is rather than kmalloc followed by memset with 0.
> > (vzalloc is for same reason with kzalloc)
> This is true but please don't apply this. There are about five other
> layers of indirection for memory allocators that want removing first so
> that the driver just uses the correct kmalloc/kzalloc/kv* functions in
> the right places.
right. kvmalloc/kvzalloc would be used after preparing those
interfaces in staging tree.
I will try to change all the atomisp_kernel_m{z}alloc() callers to
correct functions to allocate memory.


> Alan