From patchwork Thu Jun 22 07:54:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 106184 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2331141qgd; Thu, 22 Jun 2017 00:54:38 -0700 (PDT) X-Received: by 10.80.163.200 with SMTP id t8mr1657413edb.158.1498118078876; Thu, 22 Jun 2017 00:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498118078; cv=none; d=google.com; s=arc-20160816; b=M2EKmXb2IKlqSiqJZP4+FTvEJOZK08l1Q8dWHtYz1SYABqn9eo02HnzPAY5PrG/D/v He594HzEnKxMrJEHRq3b+drC9Mg4Y97+Ila3zex7uWe1a2N0hmkJudW9tUaLbOPUogbl l90ckuPeS128fznyyrkG/UDVxwmAMxpNGLKwulrJOBVW021acJ0s51QXKCxonf7pv+IU dJgB93CbZs8UsCt/gMtiNVnY1kKTC90STOBBAuz7ne78m8+BR6yvFbDzgOZHFyQ/k03e N96HK278iiRkZsTGH3Re9rAMtbvCuDgyKYpraXC9vq2wSbpXI0+UxpPf+ms9mIasQnyP ux1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :dkim-filter:arc-authentication-results; bh=PCD2nLYLobXakgE8djMpOm6Xxi4zyYdSRAEQP+Vx8HI=; b=el5P1FM4OB22VUzguphgcXQvzCRcATSoxQsEuUYnAu7Lvul0fkdy0sWxnB7XP/ZD46 fZUULiiTE30r7qYW2KL++vYXj/A4U5ZPwBION3zi44VsggoxyoccP+TKI9FuB1Uw65vZ BgorE/fLsDnDrakWyIQ1iV1oPHPs+PmMKX72Q2LDKCwB4N+HS2PF0AU66fmRRwXdcWBg bf1MgGQmvszHyZ8H0SDeB/F2yRJO+N7oP0i1t7x9oD8ubG0XjV+gHhd4mjJEiS7qc9tH I6j4CBEpMfhy9i8uA2d4yAIdS78E/BbH0kLdshZtOUmsniIk4IBLx5cB3U59wkDumXGn e5gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=fxypzVhi; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id s12si1136256edb.88.2017.06.22.00.54.38; Thu, 22 Jun 2017 00:54:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=fxypzVhi; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 4DF3EC21C88; Thu, 22 Jun 2017 07:54:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 93963C21C55; Thu, 22 Jun 2017 07:54:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 154A3C21C67; Thu, 22 Jun 2017 07:54:34 +0000 (UTC) Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by lists.denx.de (Postfix) with ESMTPS id 3F1C4C21C63 for ; Thu, 22 Jun 2017 07:54:32 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id v5M7s9k5009287; Thu, 22 Jun 2017 16:54:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v5M7s9k5009287 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1498118049; bh=UbtcUizca85YCepHkXFJero4lf2TbRHXJZw938CzIaQ=; h=From:To:Cc:Subject:Date:From; b=fxypzVhidGKLZF3tnonjYYJKIj18yyIA9mPpiykpJtRcuP4WoB52ZbF7iV5gvFXe/ A8vUoBATRvrxiG8JZ+an8inEZVc+hPJJJl6wB2bZw9D9pLmRmuRIqFch+4gf4OZMei CoNOK0kfLJ7lmuai+OUU0qo+4q2CaUwiYK7HlCO4w8cVJ7CTJmrqU1mFflpz929gRf f9AVcuDyPNOTdx0RoEn9sYSi1shuzy2Sx02cpy8AcqPvDsqBS3ex39jOkQDoJJVLwG 8vsYnIDI7B3HAms2yd21sO5EhJj3GDsEWLPBpUS4FFpMerm51TcCK9aQi/3g6qeNjK FylJOQEM0qBwQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 22 Jun 2017 16:54:03 +0900 Message-Id: <1498118047-11918-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH 1/5] dm: ofnode: use ofnode_read_bool() to check property existence X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This will clarify the code. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass Acked-by: Simon Glass --- drivers/core/ofnode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index ac312d654654..b8b16bf5e275 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -556,22 +556,22 @@ int ofnode_read_size_cells(ofnode node) bool ofnode_pre_reloc(ofnode node) { - if (ofnode_read_prop(node, "u-boot,dm-pre-reloc", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-pre-reloc")) return true; #ifdef CONFIG_TPL_BUILD - if (ofnode_read_prop(node, "u-boot,dm-tpl", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-tpl")) return true; #elif defined(CONFIG_SPL_BUILD) - if (ofnode_read_prop(node, "u-boot,dm-spl", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-spl")) return true; #else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. */ - if (ofnode_read_prop(node, "u-boot,dm-spl", NULL) || - ofnode_read_prop(node, "u-boot,dm-tpl", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-spl") || + ofnode_read_bool(node, "u-boot,dm-tpl")) return true; #endif