All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan Linz <linz@li-pro.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: ll_temac: drop obsolete "NAMESIZE" define
Date: Tue, 10 Apr 2012 18:20:57 +0200	[thread overview]
Message-ID: <1334074857-16432-1-git-send-email-linz@li-pro.net> (raw)

... 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(-)

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;
 	}
 
-- 
1.7.0.4

             reply	other threads:[~2012-04-10 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 16:20 Stephan Linz [this message]
2012-04-10 16:26 ` [U-Boot] [PATCH] net: ll_temac: drop obsolete "NAMESIZE" define Mike Frysinger
2012-04-21 15:28 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334074857-16432-1-git-send-email-linz@li-pro.net \
    --to=linz@li-pro.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.