Re: [PATCH v2] staging: cxt1e1: replace OS_kmalloc/OS_kfree with kmalloc/kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-03-21 13:27 GMT+09:00 Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>:
> 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:

I think some case does not need to get zeroed memory. :-)
I will change that and send it again.

Thanks for review.
Daeseok Youn.

>
>
>> -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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux