lkml.org 
[lkml]   [2014]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] staging: cxt1e1: replace OS_kmalloc/OS_kfree with kmalloc/kfree
On Fri, Mar 21, 2014 at 01:15:23PM +0900, Daeseok Youn wrote:
>
> Replace OS_kmalloc/OS_kfree with kmalloc/kfree.

You should replace it with kzalloc, not kmalloc, as OS_kmalloc() zeroed
out the allocated data:


> -static inline void *
> -OS_kmalloc (size_t size)
> -{
> - char *ptr = kmalloc (size, GFP_KERNEL | GFP_DMA);
> -
> - if (ptr)
> - memset (ptr, 0, size);
> - return ptr;
> -}

greg k-h


\
 
 \ /
  Last update: 2014-03-21 06:01    [W:0.331 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site