diff mbox

[U-Boot] net: ll_temac: drop obsolete "NAMESIZE" define

Message ID 1334074857-16432-1-git-send-email-linz@li-pro.net
State Accepted
Commit 34921d04b8324d06d60462222f4b98709665d5a3
Delegated to: Joe Hershberger
Headers show

Commit Message

Stephan Linz April 10, 2012, 4:20 p.m. UTC
... after commit "net/miiphy/serial: drop duplicate NAMESIZE
define" (sha1:f6add13) was applied. The building of the new
LL TEMAC network driver fails with error below:

xilinx_ll_temac.c: In function 'xilinx_ll_temac_initialize':
xilinx_ll_temac.c:301: error: 'NAMESIZE' undeclared (first use in this function)
xilinx_ll_temac.c:301: error: (Each undeclared identifier is reported only once
xilinx_ll_temac.c:301: error: for each function it appears in.)

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 drivers/net/xilinx_ll_temac.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Mike Frysinger April 10, 2012, 4:26 p.m. UTC | #1
On Tuesday 10 April 2012 12:20:57 Stephan Linz wrote:
> ... after commit "net/miiphy/serial: drop duplicate NAMESIZE
> define" (sha1:f6add13) was applied. The building of the new
> LL TEMAC network driver fails with error below:
> 
> xilinx_ll_temac.c: In function 'xilinx_ll_temac_initialize':
> xilinx_ll_temac.c:301: error: 'NAMESIZE' undeclared (first use in this
> function) xilinx_ll_temac.c:301: error: (Each undeclared identifier is
> reported only once xilinx_ll_temac.c:301: error: for each function it
> appears in.)

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Wolfgang Denk April 21, 2012, 3:28 p.m. UTC | #2
Dear Stephan Linz,

In message <1334074857-16432-1-git-send-email-linz@li-pro.net> you wrote:
> ... after commit "net/miiphy/serial: drop duplicate NAMESIZE
> define" (sha1:f6add13) was applied. The building of the new
> LL TEMAC network driver fails with error below:
> 
> xilinx_ll_temac.c: In function 'xilinx_ll_temac_initialize':
> xilinx_ll_temac.c:301: error: 'NAMESIZE' undeclared (first use in this function)
> xilinx_ll_temac.c:301: error: (Each undeclared identifier is reported only once
> xilinx_ll_temac.c:301: error: for each function it appears in.)
> 
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> ---
>  drivers/net/xilinx_ll_temac.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c
index 85660c0..27dafc1 100644
--- a/drivers/net/xilinx_ll_temac.c
+++ b/drivers/net/xilinx_ll_temac.c
@@ -298,9 +298,9 @@  int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
 
 	/* use given name or generate its own unique name */
 	if (devinf->devname) {
-		strncpy(dev->name, devinf->devname, NAMESIZE);
+		strncpy(dev->name, devinf->devname, sizeof(dev->name));
 	} else {
-		snprintf(dev->name, NAMESIZE, "lltemac.%lx", devinf->base_addr);
+		snprintf(dev->name, sizeof(dev->name), "lltemac.%lx", devinf->base_addr);
 		devinf->devname = dev->name;
 	}