* [PATCH 2/2] staging/et131x: remove memset for the TCB
@ 2012-07-12 6:09 Devendra Naga
2012-07-12 8:36 ` Dan Carpenter
2012-07-12 8:49 ` Alan Cox
0 siblings, 2 replies; 5+ messages in thread
From: Devendra Naga @ 2012-07-12 6:09 UTC (permalink / raw)
To: Mark Einon, Greg Kroah-Hartman, Francois Romieu, devel,
linux-kernel
Cc: Devendra Naga
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);
-
/* Go through and set up each TCB */
for (ct = 0; ct++ < NUM_TCB; tcb++)
/* Set the link pointer in HW TCB to the next TCB in the
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging/et131x: remove memset for the TCB
2012-07-12 6:09 [PATCH 2/2] staging/et131x: remove memset for the TCB Devendra Naga
@ 2012-07-12 8:36 ` Dan Carpenter
2012-07-12 9:11 ` devendra.aaru
2012-07-12 8:49 ` Alan Cox
1 sibling, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2012-07-12 8:36 UTC (permalink / raw)
To: Devendra Naga
Cc: Mark Einon, Greg Kroah-Hartman, Francois Romieu, devel,
linux-kernel
On Thu, Jul 12, 2012 at 11:54:28AM +0545, Devendra Naga wrote:
> TCB has kcalloc' ed so no need to call memset again on it.
>
Gar... What about when this is called from et131x_adjust_link() and
et1310_disable_phy_coma()?
Really this changelog is annoying. Based on the changelog I was
expecting the kcalloc() to be in the same function but it wasn't.
So then I have to redo all your work and check every code path. You
could have said what the code paths were in your description so I
don't have to grovel through it all myself.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging/et131x: remove memset for the TCB
2012-07-12 6:09 [PATCH 2/2] staging/et131x: remove memset for the TCB Devendra Naga
2012-07-12 8:36 ` Dan Carpenter
@ 2012-07-12 8:49 ` Alan Cox
2012-07-12 9:07 ` devendra.aaru
1 sibling, 1 reply; 5+ messages in thread
From: Alan Cox @ 2012-07-12 8:49 UTC (permalink / raw)
To: Devendra Naga
Cc: Mark Einon, Greg Kroah-Hartman, Francois Romieu, devel,
linux-kernel
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.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging/et131x: remove memset for the TCB
2012-07-12 8:49 ` Alan Cox
@ 2012-07-12 9:07 ` devendra.aaru
0 siblings, 0 replies; 5+ messages in thread
From: devendra.aaru @ 2012-07-12 9:07 UTC (permalink / raw)
To: Alan Cox
Cc: Mark Einon, Greg Kroah-Hartman, Francois Romieu, devel,
linux-kernel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging/et131x: remove memset for the TCB
2012-07-12 8:36 ` Dan Carpenter
@ 2012-07-12 9:11 ` devendra.aaru
0 siblings, 0 replies; 5+ messages in thread
From: devendra.aaru @ 2012-07-12 9:11 UTC (permalink / raw)
To: Dan Carpenter
Cc: Mark Einon, Greg Kroah-Hartman, Francois Romieu, devel,
linux-kernel
On Thu, Jul 12, 2012 at 2:21 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Jul 12, 2012 at 11:54:28AM +0545, Devendra Naga wrote:
>> TCB has kcalloc' ed so no need to call memset again on it.
>>
>
> Gar... What about when this is called from et131x_adjust_link() and
> et1310_disable_phy_coma()?
>
Yeah, i didn't looked those paths, i am sorry.
> Really this changelog is annoying. Based on the changelog I was
> expecting the kcalloc() to be in the same function but it wasn't.
> So then I have to redo all your work and check every code path. You
> could have said what the code paths were in your description so I
> don't have to grovel through it all myself.
>
Ok. will try to put all the info i found while sending patches from next time
> regards,
> dan carpenter
>
>
Thanks,
Devendra.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-12 9:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12 6:09 [PATCH 2/2] staging/et131x: remove memset for the TCB Devendra Naga
2012-07-12 8:36 ` Dan Carpenter
2012-07-12 9:11 ` devendra.aaru
2012-07-12 8:49 ` Alan Cox
2012-07-12 9:07 ` devendra.aaru
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.