From patchwork Mon Sep 5 13:38:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 75411 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp85711qgf; Mon, 5 Sep 2016 06:55:44 -0700 (PDT) X-Received: by 10.194.140.131 with SMTP id rg3mr13422760wjb.180.1473083744335; Mon, 05 Sep 2016 06:55:44 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id r125si17568707wmr.63.2016.09.05.06.55.44; Mon, 05 Sep 2016 06:55:44 -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 7231FA7574; Mon, 5 Sep 2016 15:55:42 +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 i2YWjyh7O4ic; Mon, 5 Sep 2016 15:55:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C051BA75A9; Mon, 5 Sep 2016 15:53:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8B41C4B951 for ; Mon, 5 Sep 2016 15:38:11 +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 Yf8WF9hSdZ-3 for ; Mon, 5 Sep 2016 15:38:11 +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 E5D884B98A for ; Mon, 5 Sep 2016 15:38:09 +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 u85DbUXT023684; Mon, 5 Sep 2016 22:37:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u85DbUXT023684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473082657; bh=ifq/k9W7G643Zyj1DEhU7FEqYmojPzgA8K6RykUOjic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hhg14vFrf76i3Q4nkNZMWurjvSlbYjGBeMPyfA9Y2xWdmTscEAyrVzEJFRSakyYBY LIdmgvw2PjHzbE+D7u8QBGC62N4SA0zZxD49AwCboFGpHlJgRZsc+Uw6PHYJsNfpMB iQqB4aCl5+03kXeWC+aHFzuCiP4dta5t7fHWbgIvsPbDaAQqUapDOkzpQyOSSf8wgW xQ8J294srVClumU/UFeW2rIb4UEqCmxqAnGn1oKrQTWMNzsl8HxtjdNUlx7cBjyKwR SUgXh37lUawt8eScEqMsRj9tQTrXQhWLo57lAOpHZWKF8sS3gEXjbpS/Hjx37/3srP cdpYM4ZULhzug== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 5 Sep 2016 22:38:43 +0900 Message-Id: <1473082723-17048-8-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 , David Gibson Subject: [U-Boot] [PATCH v2 7/7] libfdt: simplify fdt_del_mem_rsv() 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" The variable "err" is unneeded. [ Backport from Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ] Signed-off-by: Masahiro Yamada Signed-off-by: David Gibson --- lib/libfdt/fdt_rw.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/lib/libfdt/fdt_rw.c b/lib/libfdt/fdt_rw.c index e7321cc..47447b2 100644 --- a/lib/libfdt/fdt_rw.c +++ b/lib/libfdt/fdt_rw.c @@ -148,17 +148,13 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size) int fdt_del_mem_rsv(void *fdt, int n) { struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n); - int err; FDT_RW_CHECK_HEADER(fdt); if (n >= fdt_num_mem_rsv(fdt)) return -FDT_ERR_NOTFOUND; - err = _fdt_splice_mem_rsv(fdt, re, 1, 0); - if (err) - return err; - return 0; + return _fdt_splice_mem_rsv(fdt, re, 1, 0); } static int _fdt_resize_property(void *fdt, int nodeoffset, const char *name,