From patchwork Mon Jun 27 07:23:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70897 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp932794qgy; Mon, 27 Jun 2016 00:22:46 -0700 (PDT) X-Received: by 10.28.234.16 with SMTP id i16mr9518828wmh.36.1467012166767; Mon, 27 Jun 2016 00:22:46 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 125si202023wmo.123.2016.06.27.00.22.46; Mon, 27 Jun 2016 00:22:46 -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 23E04A7646; Mon, 27 Jun 2016 09:22:43 +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 JdcuQ4eUqZ_R; Mon, 27 Jun 2016 09:22:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A8D8BA7657; Mon, 27 Jun 2016 09:22:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2D59A75E9 for ; Mon, 27 Jun 2016 09:22:31 +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 3CLbK-NotzZ5 for ; Mon, 27 Jun 2016 09:22:31 +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-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by theia.denx.de (Postfix) with ESMTPS id 28EE3A74D6 for ; Mon, 27 Jun 2016 09:22:29 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u5R7Lfaj007984; Mon, 27 Jun 2016 16:21:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u5R7Lfaj007984 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1467012114; bh=iUjf6uiEBXcCzNDakEQB9uK+q66P1Lrdk0ThPx5OyVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1S2Vz7n0Xz9P8byI1QJDBadFbR5v4AI81e7eZKhIkQ8yvFXCZiLfuqbzcxY9sz6YL FKbpPeXAD9hPjqvr8ouQ/kLcBCkAB+zpskaP4U6di9TAVFhFU8RGxIshQEMYVCW+j2 KX/hYSF8O+cUn0fTVDLaBYUWRSREsNbWk9MPMOdejz3HmiTy8Jm6gnJhfVpzRPLKHw L+3QrJawDHIJpD3Nhkldj+m8CbPy4HnBZIpWrnjM03Be/+QdYagfT1Gm1QZf16T2Hd awkRT/FOC5NkV/sEEYBPkkajkDRSTZH+LbCauw+QuZk+medVMGl4tCssXakMDoVNnd IhnAcGjT7O+Gg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 27 Jun 2016 16:23:02 +0900 Message-Id: <1467012184-3231-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467012184-3231-1-git-send-email-yamada.masahiro@socionext.com> References: <1467012184-3231-1-git-send-email-yamada.masahiro@socionext.com> Cc: Stefan Roese , Vladimir Zapolskiy Subject: [U-Boot] [PATCH v3 4/6] autoboot: rename abortboot_{keyed, normal} to __abortboot 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" Because abortboot_keyed() and abortboot_normal() are not compiled at the same time, we can rename both of them to __abortboot(). This allows to drop #ifdef from the caller. Signed-off-by: Masahiro Yamada Reviewed-by: Stefan Roese Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- Changes in v3: None Changes in v2: None common/autoboot.c | 10 +++------- 1 file changed, 3 insertions(+), 7 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 35deece..eb31c88 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -182,7 +182,7 @@ static int passwd_abort(uint64_t etime) * Watch for 'delay' seconds for autoboot stop or autoboot delay string. * returns: 0 - no key string, allow autoboot 1 - got key string, abort */ -static int abortboot_keyed(int bootdelay) +static int __abortboot(int bootdelay) { int abort; uint64_t etime = endtick(bootdelay); @@ -216,7 +216,7 @@ static int abortboot_keyed(int bootdelay) static int menukey; #endif -static int abortboot_normal(int bootdelay) +static int __abortboot(int bootdelay) { int abort = 0; unsigned long ts; @@ -274,11 +274,7 @@ static int abortboot_normal(int bootdelay) static int abortboot(int bootdelay) { -#ifdef CONFIG_AUTOBOOT_KEYED - return abortboot_keyed(bootdelay); -#else - return abortboot_normal(bootdelay); -#endif + return __abortboot(bootdelay); } static void process_fdt_options(const void *blob)