From patchwork Fri Nov 25 15:30:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 699278 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tQKn40qKgz9t2C for ; Sat, 26 Nov 2016 02:31:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=schinagl.nl header.i=@schinagl.nl header.b="rxAijHDD"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 06B4AB383E; Fri, 25 Nov 2016 16:31:16 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zWMLXhQds_YO; Fri, 25 Nov 2016 16:31:15 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 78359B3869; Fri, 25 Nov 2016 16:31:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C7A664BDBD for ; Fri, 25 Nov 2016 16:30:43 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EUfWjMuQl4SV for ; Fri, 25 Nov 2016 16:30:43 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from 7of9.schinagl.nl (7of9.schinagl.nl [88.159.158.68]) by theia.denx.de (Postfix) with ESMTPS id 7EB4A4BA16 for ; Fri, 25 Nov 2016 16:30:41 +0100 (CET) Received: from localhost.localdomain (static-98-101-100-159.thenetworkfactory.nl [159.100.101.98]) by 7of9.schinagl.nl (Postfix) with ESMTPA id C1A8B53AC8; Fri, 25 Nov 2016 16:30:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1480087839; bh=ZD2H4k7alSrmPdiE/vOcnGxbGxfD/+2232vbVlwCX0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rxAijHDDsZ8fI90hOSwbrvhkPuuETLFoFFMae8axi8Eu01mK00Bp5Kb5V/qfDYy+c lDsWl5zSG8nyFbQYqMeSo32/fmgTnVv0Pyo6eaur0QfiXm0ITryX2b9hMS1Bn9TrIu vH3u2hkhSo5iJO7MrOODW551IY8+u0MmTbVCGVdk= From: Olliver Schinagl To: Joe Hershberger , Simon Glass , Hans de Goede Date: Fri, 25 Nov 2016 16:30:21 +0100 Message-Id: <20161125153032.14617-4-oliver@schinagl.nl> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161125153032.14617-1-oliver@schinagl.nl> References: <[PATCHv3] Retrieve MAC address from EEPROM> <20161125153032.14617-1-oliver@schinagl.nl> Cc: Fabio Estevam , Stefan Roese , Stephen Warren , Lev Iserovich , dev@linux-sunxi.org, u-boot@lists.denx.de, Alexey Brodkin , Michal Simek , Maxime Ripard , Jeffy Chen , Olliver Schinagl Subject: [U-Boot] [PATCH 03/14] net: cosmetic: Define ethernet name length X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There are various places where the ethernet device name is defined to several different sizes. Lets add a define and start using it. Signed-off-by: Olliver Schinagl Acked-by: Joe Hershberger --- include/net.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net.h b/include/net.h index af0558d..9cd7870 100644 --- a/include/net.h +++ b/include/net.h @@ -168,7 +168,8 @@ void eth_halt_state_only(void); /* Set passive state */ #ifndef CONFIG_DM_ETH struct eth_device { - char name[16]; +#define ETH_NAME_LEN 16 + char name[ETH_NAME_LEN]; unsigned char enetaddr[ARP_HLEN]; phys_addr_t iobase; int state;