lkml.org 
[lkml]   [2012]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] staging/et131x: remove memset for the TCB
From
On Thu, Jul 12, 2012 at 2:34 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Thu, 12 Jul 2012 11:54:28 +0545
> Devendra Naga <devendra.aaru@gmail.com> wrote:
>
>> TCB has kcalloc' ed so no need to call memset again on it.
>>
>> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
>> ---
>> drivers/staging/et131x/et131x.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
>> index 227fca9..5010894 100644
>> --- a/drivers/staging/et131x/et131x.c
>> +++ b/drivers/staging/et131x/et131x.c
>> @@ -2131,8 +2131,6 @@ static void et131x_init_send(struct et131x_adapter *adapter)
>>
>> tx_ring->tcb_qhead = tcb;
>>
>> - memset(tcb, 0, sizeof(struct tcb) * NUM_TCB);
>
> Its such a rarely used path with several entry points that it's probably
> safer kept as is.
>
Hi Alan Sir,

Glad to see your reply, I really didn't saw the whole code paths, was
seeing the ring allocations, sorry for the noise.
> Alan

Thanks,
Devendra.


\
 
 \ /
  Last update: 2012-07-12 12:01    [W:0.903 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site