Patchwork [U-Boot] net: ll_temac: Remove useless memory erasing

login
register
mail settings
Submitter Stephan Linz
Date Jan. 15, 2012, 7:46 p.m.
Message ID <1326656767-28695-1-git-send-email-linz@li-pro.net>
Download mbox | patch
Permalink /patch/136204/
State Changes Requested
Delegated to: Michal Simek
Headers show

Comments

Stephan Linz - Jan. 15, 2012, 7:46 p.m.
In xilinx_ll_temac_initialize() the memory is already zero-ed
by the call to calloc, so this loop is useless.

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 drivers/net/xilinx_ll_temac.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
Mike Frysinger - Jan. 15, 2012, 11:44 p.m.
On Sunday 15 January 2012 14:46:07 Stephan Linz wrote:
> In xilinx_ll_temac_initialize() the memory is already zero-ed
> by the call to calloc, so this loop is useless.

has this driver already been merged ?  if not, the process is to update the 
patch and send the new version to the list as a v2 ...
-mike
Wolfgang Denk - Jan. 16, 2012, 8:06 a.m.
Dear Stephan Linz,

In message <1326656767-28695-1-git-send-email-linz@li-pro.net> you wrote:
> In xilinx_ll_temac_initialize() the memory is already zero-ed
> by the call to calloc, so this loop is useless.
> 
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> ---
>  drivers/net/xilinx_ll_temac.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)

Please squash this into the patch that adds the driver.

Best regards,

Wolfgang Denk
Stephan Linz - Jan. 16, 2012, 5:22 p.m.
Am Sonntag, den 15.01.2012, 18:44 -0500 schrieb Mike Frysinger: 
> On Sunday 15 January 2012 14:46:07 Stephan Linz wrote:
> > In xilinx_ll_temac_initialize() the memory is already zero-ed
> > by the call to calloc, so this loop is useless.
> 
> has this driver already been merged ?  if not, the process is to update the 
> patch and send the new version to the list as a v2 ...
> -mike

You are right, I will post a new V9 patch ...

Patch

diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c
index 8533358..e050250 100644
--- a/drivers/net/xilinx_ll_temac.c
+++ b/drivers/net/xilinx_ll_temac.c
@@ -387,10 +387,6 @@  int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
 	else
 		ll_temac->phyaddr = devinf->phyaddr;
 
-	/* Tell u-boot to get the addr from the env */
-	for (i = 0; i < 6; i++)
-		dev->enetaddr[i] = 0;
-
 	eth_register(dev);
 
 	/* Try to initialize PHY here, and return */