From patchwork Tue Jun 21 05:32:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70527 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1837018qgy; Mon, 20 Jun 2016 22:32:49 -0700 (PDT) X-Received: by 10.194.71.50 with SMTP id r18mr2043864wju.116.1466487169196; Mon, 20 Jun 2016 22:32:49 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id z63si1507574wme.121.2016.06.20.22.32.48; Mon, 20 Jun 2016 22:32:49 -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 2F9CAA763D; Tue, 21 Jun 2016 07:32:46 +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 6-79SRa5pP2x; Tue, 21 Jun 2016 07:32:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7C0EA7694; Tue, 21 Jun 2016 07:32:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CD8FDA7664 for ; Tue, 21 Jun 2016 07:32:34 +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 b-I0ATcJcnMU for ; Tue, 21 Jun 2016 07:32:34 +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-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 29081A756E for ; Tue, 21 Jun 2016 07:32:32 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u5L5Va1i023978; Tue, 21 Jun 2016 14:31:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u5L5Va1i023978 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1466487110; bh=6fctkcrx2qYWZ7FnGHV4whkugCJFoWQBfF/nW2h+Yec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jsI9jc9XVyVTezUV7QJI9KaSl+Y6B2EV7rBpk1MwWSS0e8d/UjS4rMnw+D9I6HWww pOqH3zbPDnfSgdjwhb3WMVvq9JLrDxlYV2WGuYH3XchTrRkNSbANfoFBckotjTHzgI gwKPsfHqxLTD+AX6Mhg05nsJVyk6UJRif45girnKkYU37OEbxVpnrqgnlhiaJRN/9W Yp2gs6BPmGpYhv/sDoSTUeGj4FditCO/mtK573xhID9jDsZGzoZYonld0LrefEC7NI +ICbLIUDNN0lktarYPTOjq3nudgrgmi/2MZ+1C5PiCfgjZddTPS1oVcDR3+MoA2vpn aweV32BGAgwrg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 21 Jun 2016 14:32:46 +0900 Message-Id: <1466487167-18987-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466487167-18987-1-git-send-email-yamada.masahiro@socionext.com> References: <1466487167-18987-1-git-send-email-yamada.masahiro@socionext.com> Cc: Stefan Roese Subject: [U-Boot] [PATCH 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 --- 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..2d19104 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 ret; + + ret = __abortboot(bootdelay); + +#ifdef CONFIG_SILENT_CONSOLE + if (abort) + gd->flags &= ~GD_FLG_SILENT; +#endif + + return ret; } static void process_fdt_options(const void *blob)