From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161120AbcHEJP6 (ORCPT ); Fri, 5 Aug 2016 05:15:58 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:15636 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161076AbcHEJO7 (ORCPT ); Fri, 5 Aug 2016 05:14:59 -0400 X-IronPort-AV: E=Sophos;i="5.28,473,1464645600"; d="scan'208";a="229087760" From: Julia Lawall To: Kishon Vijay Abraham I Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/11] phy: qcom-ufs: use of_property_read_bool Date: Fri, 5 Aug 2016 10:56:47 +0200 Message-Id: <1470387411-15879-8-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470387411-15879-1-git-send-email-Julia.Lawall@lip6.fr> References: <1470387411-15879-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall --- drivers/phy/phy-qcom-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 107cb57..8eaf60a 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -283,7 +283,7 @@ static int __ufs_qcom_phy_init_vreg(struct phy *phy, err = 0; } snprintf(prop_name, MAX_PROP_NAME, "%s-always-on", name); - if (of_get_property(dev->of_node, prop_name, NULL)) + if (of_property_read_bool(dev->of_node, prop_name)) vreg->is_always_on = true; else vreg->is_always_on = false; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Date: Fri, 05 Aug 2016 08:56:47 +0000 Subject: [PATCH 07/11] phy: qcom-ufs: use of_property_read_bool Message-Id: <1470387411-15879-8-git-send-email-Julia.Lawall@lip6.fr> List-Id: References: <1470387411-15879-1-git-send-email-Julia.Lawall@lip6.fr> In-Reply-To: <1470387411-15879-1-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kishon Vijay Abraham I Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // Signed-off-by: Julia Lawall --- drivers/phy/phy-qcom-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 107cb57..8eaf60a 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -283,7 +283,7 @@ static int __ufs_qcom_phy_init_vreg(struct phy *phy, err = 0; } snprintf(prop_name, MAX_PROP_NAME, "%s-always-on", name); - if (of_get_property(dev->of_node, prop_name, NULL)) + if (of_property_read_bool(dev->of_node, prop_name)) vreg->is_always_on = true; else vreg->is_always_on = false;