staging/et131x: remove memset for the TCB
PATCH 2/2 staging/et131x: remove memset for the TCB
TCB has kcalloc' ed so no need to call memset again on it.
--- drivers/staging/et131x/et131x.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/et131x/et131x.c +0 -2
@@ -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
Signature · 1 line
1.7.9.5
Quoted 2 lines · Devendra Naga
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
Quoted 7 lines · Dan Carpenter
Quoted 2 lines · Devendra Naga
TCB has kcalloc' ed so no need to call memset again on it.
Gar... What about when this is called from
et131x_adjust_link()andet1310_disable_phy_coma()?
Yeah, i didn't looked those paths, i am sorry.
Quoted 6 lines
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
Quoted 4 lines
regards,
dan carpenter
Thanks,
Devendra.
Quoted 12 lines · On Thu, 12 Jul 2012 11:54:28 +0545 Devendra Naga <[email protected]>…
TCB has kcalloc' ed so no need to call memset again on it.
Signed-off-by Devendra Naga <[email protected]>--- drivers/staging/et131x/et131x.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/et131x/et131x.c +0
-0
drivers/staging/et131x/et131x.c static void et131x_init_send(struct et131x_adapter *adapter) · line 2134
Quoted 4 lines
drivers/staging/et131x/et131x.c +0
-1@@ -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
Quoted 16 lines · Alan Cox
Quoted 13 lines · On Thu, 12 Jul 2012 11:54:28 +0545 Devendra Naga <[email protected]>…
TCB has kcalloc' ed so no need to call memset again on it.
Signed-off-by Devendra Naga <[email protected]>--- drivers/staging/et131x/et131x.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/et131x/et131x.c +0
-0@@ -2131,8 +2131,6 @@ static void et131x_init_send(struct et131x_adapter *adapter)
Quoted 7 lines
drivers/staging/et131x/et131x.c static void et131x_init_send(struct et131x_adapter *adapter) · line 2134
Quoted 3 lines
drivers/staging/et131x/et131x.c +0
-1tx_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.
Quoted 1 line
Alan
Thanks,
Devendra.