From patchwork Fri Aug 5 08:56:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 656107 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3s5Lls2w0Hz9t1G for ; Fri, 5 Aug 2016 19:16:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934845AbcHEJQS (ORCPT ); Fri, 5 Aug 2016 05:16:18 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:15639 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934785AbcHEJO7 (ORCPT ); Fri, 5 Aug 2016 05:14:59 -0400 X-IronPort-AV: E=Sophos;i="5.28,473,1464645600"; d="scan'208";a="229087762" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 05 Aug 2016 11:14:10 +0200 From: Julia Lawall To: netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] net/fsl: use of_property_read_bool Date: Fri, 5 Aug 2016 10:56:48 +0200 Message-Id: <1470387411-15879-9-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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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/net/ethernet/freescale/xgmac_mdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index 7b8fe86..a77ba98 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -271,8 +271,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev) goto err_ioremap; } - if (of_get_property(pdev->dev.of_node, - "little-endian", NULL)) + if (of_property_read_bool(pdev->dev.of_node, "little-endian")) priv->is_little_endian = true; else priv->is_little_endian = false;