From patchwork Tue Sep 6 13:17:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 75511 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp544383qgf; Tue, 6 Sep 2016 06:18:10 -0700 (PDT) X-Received: by 10.28.156.144 with SMTP id f138mr15418404wme.86.1473167889551; Tue, 06 Sep 2016 06:18:09 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id kk10si30841216wjb.267.2016.09.06.06.18.09; Tue, 06 Sep 2016 06:18:09 -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 4565A4B9F9; Tue, 6 Sep 2016 15:18:08 +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 XDkZEF01oSNX; Tue, 6 Sep 2016 15:18:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 05056B381E; Tue, 6 Sep 2016 15:16:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 512B84BA3B for ; Tue, 6 Sep 2016 15:16:10 +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 XC9gNtxOpFPE for ; Tue, 6 Sep 2016 15:16:10 +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 811FC4B9AD for ; Tue, 6 Sep 2016 15:16:06 +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 u86DFbiv013304; Tue, 6 Sep 2016 22:15:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com u86DFbiv013304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473167745; bh=RHa8yi92e8A7VzC2uXVaVDa8Z/Q1ZsbJOBGo9HYtSBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vSeTZNbocfVkgXNnPhDj5wr17xeVkB8/mo93b1uUBcnyJu0gw5b+ra5b0scQkLaCN n2X25f52c3qdfRyFKfwbkwn8NVcZNPZvAoYG/hL7XO0z6okrlqXxWejYPgBpKH2b9i 1FVS3HXTklJANtbzNpgceRrC0ymIXuQWRa5TQiL+3zoZjoi84J6aFY8waQSZBCoGMC c/dbpVGBTCM7AUdXD7pr7UE1PJzrizYCdp3fZ2txPLiZRliHpGVzlN5LUedtJuto/M z++AHp5rSTHGMACFf6bWoLcRVXDzAdh2nI4agdyRDBHC572ZDxJ7G9EMy8K6CVHFT/ VpstpAklVlytA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 6 Sep 2016 22:17:37 +0900 Message-Id: <1473167860-27465-7-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 , David Gibson Subject: [U-Boot] [PATCH v3 6/8] 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. [ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ] Signed-off-by: Masahiro Yamada Signed-off-by: David Gibson --- Changes in v3: None 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,