From patchwork Wed May 11 14:00:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 95152 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 744C6B6FC1 for ; Thu, 12 May 2011 00:02:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C459D280A0; Wed, 11 May 2011 16:01:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 NJ0Oy06s2f2Q; Wed, 11 May 2011 16:01:41 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC7912809B; Wed, 11 May 2011 16:01:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8DF8F2809E for ; Wed, 11 May 2011 16:01:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 qV3W6NvGn4Et for ; Wed, 11 May 2011 16:01:04 +0200 (CEST) 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 adserver.comelit.it (mail.comelit.it [217.56.59.218]) by theia.denx.de (Postfix) with ESMTP id 7889F280A0 for ; Wed, 11 May 2011 16:00:42 +0200 (CEST) Received: from com-exc-01.comelit.it ([172.24.0.31]) by adserver.comelit.it with Microsoft SMTPSVC(6.0.3790.1830); Wed, 11 May 2011 15:59:42 +0200 Received: from wallace.comelit.it ([172.20.0.35]) by com-exc-01.comelit.it with Microsoft SMTPSVC(6.0.3790.4675); Wed, 11 May 2011 16:00:40 +0200 From: Luca Ceresoli To: u-boot@lists.denx.de Date: Wed, 11 May 2011 16:00:00 +0200 Message-Id: <1305122401-14967-8-git-send-email-luca.ceresoli@comelit.it> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1304512847-7351-1-git-send-email-luca.ceresoli@comelit.it> References: <1304512847-7351-1-git-send-email-luca.ceresoli@comelit.it> X-OriginalArrivalTime: 11 May 2011 14:00:40.0803 (UTC) FILETIME=[CFF7FB30:01CC0FE3] X-TM-AS-Product-Ver: SMEX-8.6.0.1168-6.500.1024-18128.004 X-TM-AS-Result: No--10.337100-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Cc: Luca Ceresoli , biggerbadderben@gmail.com Subject: [U-Boot] [PATCH v2 7/8] net/net.c: cosmetic: fix indentation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This removes the following checkpatch issues: - ERROR: switch and case should be at the same indent - WARNING: suspect code indent for conditional statements - WARNING: labels should not be indented Signed-off-by: Luca Ceresoli Cc: Wolfgang Denk Cc: Ben Warren Cc: Mike Frysinger --- Changes since v1: none. net/net.c | 85 ++++++++++++++++++++++++++++++------------------------------- 1 files changed, 42 insertions(+), 43 deletions(-) diff --git a/net/net.c b/net/net.c index 63fc60a..8b4d28e 100644 --- a/net/net.c +++ b/net/net.c @@ -1104,51 +1104,50 @@ CDPHandler(const uchar *pkt, unsigned len) tlen -= 4; switch (type) { - case CDP_DEVICE_ID_TLV: - break; - case CDP_ADDRESS_TLV: - break; - case CDP_PORT_ID_TLV: - break; - case CDP_CAPABILITIES_TLV: - break; - case CDP_VERSION_TLV: - break; - case CDP_PLATFORM_TLV: - break; - case CDP_NATIVE_VLAN_TLV: - nvlan = *ss; - break; - case CDP_APPLIANCE_VLAN_TLV: - t = (const uchar *)ss; - while (tlen > 0) { - if (tlen < 3) - goto pkt_short; + case CDP_DEVICE_ID_TLV: + break; + case CDP_ADDRESS_TLV: + break; + case CDP_PORT_ID_TLV: + break; + case CDP_CAPABILITIES_TLV: + break; + case CDP_VERSION_TLV: + break; + case CDP_PLATFORM_TLV: + break; + case CDP_NATIVE_VLAN_TLV: + nvlan = *ss; + break; + case CDP_APPLIANCE_VLAN_TLV: + t = (const uchar *)ss; + while (tlen > 0) { + if (tlen < 3) + goto pkt_short; - applid = t[0]; - ss = (const ushort *)(t + 1); + applid = t[0]; + ss = (const ushort *)(t + 1); #ifdef CONFIG_CDP_APPLIANCE_VLAN_TYPE - if (applid == - CONFIG_CDP_APPLIANCE_VLAN_TYPE) - vlan = *ss; + if (applid == CONFIG_CDP_APPLIANCE_VLAN_TYPE) + vlan = *ss; #else - /* XXX will this work; dunno */ - vlan = ntohs(*ss); + /* XXX will this work; dunno */ + vlan = ntohs(*ss); #endif - t += 3; tlen -= 3; - } - break; - case CDP_TRIGGER_TLV: - break; - case CDP_POWER_CONSUMPTION_TLV: - break; - case CDP_SYSNAME_TLV: - break; - case CDP_SYSOBJECT_TLV: - break; - case CDP_MANAGEMENT_ADDRESS_TLV: - break; + t += 3; tlen -= 3; + } + break; + case CDP_TRIGGER_TLV: + break; + case CDP_POWER_CONSUMPTION_TLV: + break; + case CDP_SYSNAME_TLV: + break; + case CDP_SYSOBJECT_TLV: + break; + case CDP_MANAGEMENT_ADDRESS_TLV: + break; } } @@ -1608,7 +1607,7 @@ NetReceive(volatile uchar *inpkt, int len) #ifdef CONFIG_MCAST_TFTP if (Mcast_addr != tmp) #endif - return; + return; } /* * The function returns the unchanged packet if it's not @@ -1784,7 +1783,7 @@ static int net_check_prereq(proto_t protocol) } #if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \ defined(CONFIG_CMD_DNS) - common: +common: #endif if (NetOurIP == 0) { @@ -1879,7 +1878,7 @@ NetSetEther(volatile uchar *xet, uchar * addr, uint prot) memcpy(et->et_dest, addr, 6); memcpy(et->et_src, NetOurEther, 6); if ((myvlanid & VLAN_IDMASK) == VLAN_NONE) { - et->et_protlen = htons(prot); + et->et_protlen = htons(prot); return ETHER_HDR_SIZE; } else { VLAN_Ethernet_t *vet = (VLAN_Ethernet_t *)xet;