[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHb8M2CN76KQ_a1fr_uw_qk+TDh3Lp7esn+MT6E4EA-27p+gJg@mail.gmail.com>
Date: Thu, 6 Mar 2014 16:02:44 +0900
From: DaeSeok Youn <daeseok.youn@...il.com>
To: Tobias Klauser <tklauser@...tanz.ch>
Cc: Greg KH <gregkh@...uxfoundation.org>,
"sachin.kamat" <sachin.kamat@...aro.org>,
devel <devel@...verdev.osuosl.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Dulshani Gunawardhana <dulshani.gunawardhana89@...il.com>
Subject: Re: [PATCH] staging: cxt1e1: use kzalloc instead of kmalloc/memset 0
Thanks for review.
OK. I will try to change all of OS_kmalloc to kmalloc/kzalloc.
And I also check GFP_DMA flag in kmalloc/kzalloc.
Regards,
Daeseok Youn
2014-03-05 19:04 GMT+09:00 Tobias Klauser <tklauser@...tanz.ch>:
> On 2014-03-05 at 03:37:15 +0100, Daeseok Youn <daeseok.youn@...il.com> wrote:
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
>> ---
>> drivers/staging/cxt1e1/sbecom_inline_linux.h | 6 ++----
>> 1 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h b/drivers/staging/cxt1e1/sbecom_inline_linux.h
>> index ba3ff3e..6dd1b55 100644
>> --- a/drivers/staging/cxt1e1/sbecom_inline_linux.h
>> +++ b/drivers/staging/cxt1e1/sbecom_inline_linux.h
>> @@ -46,11 +46,9 @@ void pci_write_32 (u_int32_t *p, u_int32_t v);
>> static inline void *
>> OS_kmalloc (size_t size)
>> {
>> - char *ptr = kmalloc (size, GFP_KERNEL | GFP_DMA);
>> + char *ptr = kzalloc(size, GFP_KERNEL | GFP_DMA);
>>
>> - if (ptr)
>> - memset (ptr, 0, size);
>> - return ptr;
>> + return ptr;
>> }
>
> It would probably be even better to get rid of this function altogether
> and replace all calls to it by kmalloc/kzalloc.
>
> From a quick look at the users of OS_kmalloc, it also looks like GFP_DMA
> isn't needed for all of them.
>
> Cheers
> Tobias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists