From patchwork Mon Sep 5 13:38: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: 75407 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp83351qgf; Mon, 5 Sep 2016 06:49:21 -0700 (PDT) X-Received: by 10.28.54.211 with SMTP id y80mr11883007wmh.52.1473083361480; Mon, 05 Sep 2016 06:49:21 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id y21si9063873wmc.12.2016.09.05.06.49.21; Mon, 05 Sep 2016 06:49: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 C79B54B951; Mon, 5 Sep 2016 15:49:06 +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 rIt9CZ5v_qWU; Mon, 5 Sep 2016 15:49:06 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92506A7527; Mon, 5 Sep 2016 15:48:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 504E74B951 for ; Mon, 5 Sep 2016 15:38:38 +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 ROZA-F21xaUe for ; Mon, 5 Sep 2016 15:38:36 +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 64DAD4B98A for ; Mon, 5 Sep 2016 15:38:27 +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 u85DbUXQ023684; Mon, 5 Sep 2016 22:37:35 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u85DbUXQ023684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473082655; bh=BXjMG/Q1K2EaWUjmuQIEPALyLjZlebdE84k+yRt3fvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0etgngWVhRmDtayohooTLInghIdj2DtbOQZu+1Ow2tx2dlxDTlYXkSHS/TJk4N63h 4rysObeKxCm7aul09V7zGYNr2t5AxyvDWoCrio4KDhLbGM5y03UJZcnEvrfE0yRac9 E1l00cKoWGEQJvsRgh5JHv2ax1C5vPnrKLyFUJ0L27Mp8w8kSqbmgXIHtlu/GNlMzJ rJyw/5eA9z/z6lRIBA9iSNVCqC9JNTBg4NYwiEbGPZ+Mxq8qWbxYqww2lQwKpcUWsh jB21PiHaj/AeuSDv3aYoANFgl9B1thEp2S0d4sw41/zBc7+qROcsHANoeRb+nrXj86 OUVHa1D8abNgQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 5 Sep 2016 22:38:40 +0900 Message-Id: <1473082723-17048-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473082723-17048-1-git-send-email-yamada.masahiro@socionext.com> References: <1473082723-17048-1-git-send-email-yamada.masahiro@socionext.com> Cc: Marek Vasut , Stephen Warren Subject: [U-Boot] [PATCH v2 4/7] 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 --- 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)