From patchwork Thu Jun 23 15:42:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70765 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp496993qgy; Thu, 23 Jun 2016 08:43:41 -0700 (PDT) X-Received: by 10.194.172.102 with SMTP id bb6mr32714191wjc.151.1466696621349; Thu, 23 Jun 2016 08:43:41 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id l8si936022wjw.13.2016.06.23.08.43.41; Thu, 23 Jun 2016 08:43:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7CE9A7558; Thu, 23 Jun 2016 17:43:33 +0200 (CEST) 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 mfurWAZN8tIo; Thu, 23 Jun 2016 17:43:33 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4BAAEA7593; Thu, 23 Jun 2016 17:43:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DA78EA7594 for ; Thu, 23 Jun 2016 17:43:22 +0200 (CEST) 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 GZH54hYGE-no for ; Thu, 23 Jun 2016 17:43:22 +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 conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by theia.denx.de (Postfix) with ESMTPS id 1C1D9A75A9 for ; Thu, 23 Jun 2016 17:43:19 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-10.nifty.com with ESMTP id u5NFggq2027414; Fri, 24 Jun 2016 00:42:57 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com u5NFggq2027414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1466696577; bh=jkZKqgwwm5rQBWr3rCP+A+6Xqxu0Me2GQ9prxI8xX5k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdME/ehipsxHgpUubQA78KEmi1ZNEVOhAM/cC3glW0/71fTvi9tfs+SSTuKh2wEv5 fi/E9WkbvUM/VfbhexugG7iv/cO4mXAGK+poNPoHJGAhFouEkPBt8tzlOt5wziJerS rrdWtCGLJAtkUF++dNdOh4o64s4BdpnIO211vfMTZLdPFJgtt94NsnNFdyi4lQc/OF I6wGbdXj1xVZ5XHjXe2dwIBRuTohId7VCLX7OkYXBVEOk+//SLjBUrgGiSgt1l+FSb ygEwXNOOisfx60nP6J0uTx/W0gdD3rvppys1uKE4r/GBi07YyY2MSLJd0s1Tef0Qo0 4Prg/5S4C7kyg== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 24 Jun 2016 00:42:40 +0900 Message-Id: <1466696561-22935-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466696561-22935-1-git-send-email-yamada.masahiro@socionext.com> References: <1466696561-22935-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH v2 5/6] autoboot: move CONFIG_SILENT_CONSOLE handling 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" Factor out the same code from the callees to the caller. Signed-off-by: Masahiro Yamada Reviewed-by: Stefan Roese Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- Changes in v2: - Fix build error when CONFIG_SILENT_CONSOLE is enabled common/autoboot.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/common/autoboot.c b/common/autoboot.c index eb31c88..fb13139 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -202,11 +202,6 @@ static int __abortboot(int bootdelay) if (!abort) debug_bootkeys("key timeout\n"); -#ifdef CONFIG_SILENT_CONSOLE - if (abort) - gd->flags &= ~GD_FLG_SILENT; -#endif - return abort; } @@ -263,18 +258,22 @@ static int __abortboot(int bootdelay) putc('\n'); -#ifdef CONFIG_SILENT_CONSOLE - if (abort) - gd->flags &= ~GD_FLG_SILENT; -#endif - return abort; } # endif /* CONFIG_AUTOBOOT_KEYED */ static int abortboot(int bootdelay) { - return __abortboot(bootdelay); + int abort; + + abort = __abortboot(bootdelay); + +#ifdef CONFIG_SILENT_CONSOLE + if (abort) + gd->flags &= ~GD_FLG_SILENT; +#endif + + return abort; } static void process_fdt_options(const void *blob)