From patchwork Fri Jun 17 12:51:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70319 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp263055qgy; Fri, 17 Jun 2016 05:51:32 -0700 (PDT) X-Received: by 10.28.165.206 with SMTP id o197mr16572961wme.102.1466167892507; Fri, 17 Jun 2016 05:51:32 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id xz4si11892139wjb.178.2016.06.17.05.51.32; Fri, 17 Jun 2016 05:51:32 -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 F136BA75D5; Fri, 17 Jun 2016 14:51: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 7GtCIEeu2UQX; Fri, 17 Jun 2016 14:51:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 569BBA755D; Fri, 17 Jun 2016 14:51:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7019A755D for ; Fri, 17 Jun 2016 14:51:27 +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 W6D59FXL8o40 for ; Fri, 17 Jun 2016 14:51:27 +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-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by theia.denx.de (Postfix) with ESMTPS id 092A5A753B for ; Fri, 17 Jun 2016 14:51:23 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id u5HCoZtS014912; Fri, 17 Jun 2016 21:50:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u5HCoZtS014912 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1466167837; bh=PIdLubDOjtsMyfTiAHcGNoDjMmZvlKFdlNzN5aQevGw=; h=From:To:Cc:Subject:Date:From; b=GHprXj4PfqrFiEXDiKZ5UrluTH1Va7aT1gbRrQEHp0PAxhDpgA3Rc3rtQHlCMkbsk joVk3ohF88wa8mvjesN4IRyEp15ODy7maXAEUPbFA9/30QIxhVrUX6FAgrEEik8EXh AxRg03hwSQ2shxNIsynv7Dh3bEhHchTClZ+Z3401J+sVQX4VMTtWgbUo+0Eiw3JjZ7 aYPCHdcIPhTvS8zZoedkuKYSBbjGXxjDxSTMninBFkOhLexhTVfmyYheNTg5+xB/pM VEn+UbsUCtYxYeHcqHxWt7Qiv5dodV6/NjtO1eR4FN1VQUuRJ9W2gfMQY+bmmUss0I 2Q/Q4/E8Pcvlg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 17 Jun 2016 21:51:48 +0900 Message-Id: <1466167909-15345-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Cc: Tom Rini Subject: [U-Boot] [PATCH 1/2] ARM: move #ifdef to match the error handling code 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" Match the #ifdef ... #endif and the code, ret = do_something(); if (ret) return ret; This will make it easier to add more #ifdef'ed code. Signed-off-by: Masahiro Yamada --- arch/arm/lib/bootm-fdt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 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/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c index 7677358..76b75d8 100644 --- a/arch/arm/lib/bootm-fdt.c +++ b/arch/arm/lib/bootm-fdt.c @@ -42,11 +42,14 @@ int arch_fixup_fdt(void *blob) } ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS); -#ifdef CONFIG_ARMV7_NONSEC if (ret) return ret; +#ifdef CONFIG_ARMV7_NONSEC ret = psci_update_dt(blob); + if (ret) + return ret; #endif - return ret; + + return 0; }