From patchwork Wed May 15 16:23:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 244136 X-Patchwork-Delegate: trini@ti.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 E4BFA2C008C for ; Thu, 16 May 2013 02:25:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F189A4A049; Wed, 15 May 2013 18:25:26 +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 j+4GNeFVd44C; Wed, 15 May 2013 18:25:26 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A114A4A08A; Wed, 15 May 2013 18:24:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98C874A03E for ; Wed, 15 May 2013 18:24:47 +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 sn1Qi1pXk4yw for ; Wed, 15 May 2013 18:24:41 +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 mail-vb0-f73.google.com (mail-vb0-f73.google.com [209.85.212.73]) by theia.denx.de (Postfix) with ESMTPS id 11EC84A046 for ; Wed, 15 May 2013 18:24:28 +0200 (CEST) Received: by mail-vb0-f73.google.com with SMTP id e13so62932vbg.4 for ; Wed, 15 May 2013 09:24:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=4JcoG5dNFpowvHInGNFperpphOYJ1McXpcljiCrZrnU=; b=dzHEYj0sArzGyg/cHnqyU4WUtWzijnvUtYJQO8j1hTstv/Wangn3PZByJd1I75qWap pzZOEdcUusUlwt0Kh5sjXvyJFdo2BJa5tLqdBUwTHij/he6pJm3CvDmP54DB2ZdjzKEo KlBmZQsA41GkVzTJa8KbhaPx6L0p/kIAe0MnP+BNiV6xgxzQ1Lvkw3u1LS3g3lXduGOg 7wUrawDqj43fXCUuI72oY21d2ZcJ/Shz7xGe6mjvgcJRYWsQg8M4/OGoVZQZZ1doHcKm IIvd8iQeCx+/XaL8LGwRC+AIS3c6SSiusIXX2Rr3H9ggsAHsOJ7JJno1QmOZi7gcFch3 yjmg== X-Received: by 10.236.127.4 with SMTP id c4mr10203787yhi.24.1368635067520; Wed, 15 May 2013 09:24:27 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id h2si196526yhj.2.2013.05.15.09.24.27 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 15 May 2013 09:24:27 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 5B72C31C1A7; Wed, 15 May 2013 09:24:27 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 1DBDB16069C; Wed, 15 May 2013 09:24:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 15 May 2013 09:23:58 -0700 Message-Id: <1368635041-27638-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1368635041-27638-1-git-send-email-sjg@chromium.org> References: <1368635041-27638-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkcHLTiK7uhrWiuQ1Ubt62XDLboMghb5r1D4Q8aZiqTc6lt7nz1qz1KgHFiZJfxvR6/5C9fsySgScgIVW5/MkqE4TXmdNGckAhPqC62Mv3r55uhhiFWg7d5FLHbsnP2beCHLqPasCFOfGiTQrsUcN6KDsskQzgRdkOYNTUVVHLuDRxrouaNEz4IOWNR8fjahZqDeXsZ Cc: Tom Rini , Joe Hershberger , u-boot-review@google.com Subject: [U-Boot] [PATCH v4 6/9] main: Fix typos and checkpatch warnings in command line reading X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 There are a few over-long lines and other checkpatch problems in this area of the code. Prepare the ground for the next patch by tidying these up. Signed-off-by: Simon Glass Reviewed-by: Joe Hershberger --- Changes in v4: None Changes in v3: - Separate out checkpatch fixes in command line reading code into new patch common/main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/common/main.c b/common/main.c index 38fadac..1adfea6 100644 --- a/common/main.c +++ b/common/main.c @@ -1078,20 +1078,20 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout) * Special character handling */ switch (c) { - case '\r': /* Enter */ + case '\r': /* Enter */ case '\n': *p = '\0'; puts ("\r\n"); - return (p - p_buf); + return p - p_buf; - case '\0': /* nul */ + case '\0': /* nul */ continue; - case 0x03: /* ^C - break */ + case 0x03: /* ^C - break */ p_buf[0] = '\0'; /* discard input */ - return (-1); + return -1; - case 0x15: /* ^U - erase line */ + case 0x15: /* ^U - erase line */ while (col > plen) { puts (erase_seq); --col; @@ -1100,15 +1100,15 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout) n = 0; continue; - case 0x17: /* ^W - erase word */ + case 0x17: /* ^W - erase word */ p=delete_char(p_buf, p, &col, &n, plen); while ((n > 0) && (*p != ' ')) { p=delete_char(p_buf, p, &col, &n, plen); } continue; - case 0x08: /* ^H - backspace */ - case 0x7F: /* DEL - backspace */ + case 0x08: /* ^H - backspace */ + case 0x7F: /* DEL - backspace */ p=delete_char(p_buf, p, &col, &n, plen); continue; @@ -1117,7 +1117,7 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout) * Must be a normal character then */ if (n < CONFIG_SYS_CBSIZE-2) { - if (c == '\t') { /* expand TABs */ + if (c == '\t') { /* expand TABs */ #ifdef CONFIG_AUTO_COMPLETE /* if auto completion triggered just continue */ *p = '\0'; @@ -1132,7 +1132,7 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout) char buf[2]; /* - * Echo input using puts() to force am + * Echo input using puts() to force an * LCD flush if we are using an LCD */ ++col;