From patchwork Tue Sep 6 13:17:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 75514 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp544985qgf; Tue, 6 Sep 2016 06:19:21 -0700 (PDT) X-Received: by 10.28.23.141 with SMTP id 135mr21600298wmx.100.1473167961753; Tue, 06 Sep 2016 06:19:21 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id ud2si24315430wjc.0.2016.09.06.06.19.21; Tue, 06 Sep 2016 06:19:21 -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 0542BB3822; Tue, 6 Sep 2016 15:19:21 +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 4XOpYiPKnylA; Tue, 6 Sep 2016 15:19:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 767D0B3824; Tue, 6 Sep 2016 15:17:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4727E4BA29 for ; Tue, 6 Sep 2016 15:16:19 +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 aqgVA8K79Jo4 for ; Tue, 6 Sep 2016 15:16:19 +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 097B84B9AD for ; Tue, 6 Sep 2016 15:16:17 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id u86DFbiu013304; Tue, 6 Sep 2016 22:15:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com u86DFbiu013304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473167744; bh=fA/MyHkWNL6qKMBhrpQBODt1HlV76osaNXtKgBD6+mc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CUGaN/8vkTll2CTynHAyh5gLNFksGVwaddD5Sbb9lTSb9SwrEBzS4Jv1/CVmO7IsP iCx0Xk9IY6iKlov1bT7cVJkvVBcfk4avmfo8BxAPdEBYyaX+wPQoh7Uujg+jSrXKfE hL/OjzXx+mpQJWZlY0cb2dsIlV/XyenAfN/nZJtUXEKMeVFu3YINVVadXattXI1nih L8TG0s3nnip7TLnpG+Mjzxp5az45G9SbBCWoat1C+ep8FNIy7Wcw9YBDUCoCuoBtfi sn7vxEAWLOt271gHA+g6iQx/co1mGm8rvZsSzzORVeQS3w/W8t2mOLHjFL4wudARnm AGfZ/PS4k0kVw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 6 Sep 2016 22:17:36 +0900 Message-Id: <1473167860-27465-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473167860-27465-1-git-send-email-yamada.masahiro@socionext.com> References: <1473167860-27465-1-git-send-email-yamada.masahiro@socionext.com> Cc: Marek Vasut , Stephen Warren Subject: [U-Boot] [PATCH v3 5/8] x86: squash lines for immediate return 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" arch_cpu_init() can be simpler by this refactoring. Signed-off-by: Masahiro Yamada Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None arch/x86/cpu/baytrail/valleyview.c | 8 +------- arch/x86/cpu/ivybridge/ivybridge.c | 8 +------- arch/x86/cpu/qemu/qemu.c | 8 +------- arch/x86/cpu/queensbay/tnc.c | 8 +------- 4 files changed, 4 insertions(+), 28 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c index b31f24e..b312d9f 100644 --- a/arch/x86/cpu/baytrail/valleyview.c +++ b/arch/x86/cpu/baytrail/valleyview.c @@ -25,15 +25,9 @@ int cpu_mmc_init(bd_t *bis) #ifndef CONFIG_EFI_APP int arch_cpu_init(void) { - int ret; - post_code(POST_CPU_INIT); - ret = x86_cpu_init_f(); - if (ret) - return ret; - - return 0; + return x86_cpu_init_f(); } int arch_misc_init(void) diff --git a/arch/x86/cpu/ivybridge/ivybridge.c b/arch/x86/cpu/ivybridge/ivybridge.c index c770b53..e817eb9 100644 --- a/arch/x86/cpu/ivybridge/ivybridge.c +++ b/arch/x86/cpu/ivybridge/ivybridge.c @@ -10,13 +10,7 @@ int arch_cpu_init(void) { - int ret; - post_code(POST_CPU_INIT); - ret = x86_cpu_init_f(); - if (ret) - return ret; - - return 0; + return x86_cpu_init_f(); } diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 680e558..c3092f2 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -139,15 +139,9 @@ static void qemu_chipset_init(void) int arch_cpu_init(void) { - int ret; - post_code(POST_CPU_INIT); - ret = x86_cpu_init_f(); - if (ret) - return ret; - - return 0; + return x86_cpu_init_f(); } #ifndef CONFIG_EFI_STUB diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c index b226e4c..f307c62 100644 --- a/arch/x86/cpu/queensbay/tnc.c +++ b/arch/x86/cpu/queensbay/tnc.c @@ -94,15 +94,9 @@ static int __maybe_unused disable_igd(void) int arch_cpu_init(void) { - int ret; - post_code(POST_CPU_INIT); - ret = x86_cpu_init_f(); - if (ret) - return ret; - - return 0; + return x86_cpu_init_f(); } int arch_early_init_r(void)