From: Stephan Linz Date: Tue, 10 Apr 2012 06:20:57 +0000 (+0000) Subject: net: ll_temac: drop obsolete "NAMESIZE" define X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=34921d04b8324d06d60462222f4b98709665d5a3;p=u-boot.git net: ll_temac: drop obsolete "NAMESIZE" define ... 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 Acked-by: Mike Frysinger --- diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c index 85660c0216..27dafc15c0 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; }