From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/11] net/fsl: use of_property_read_bool
Date: Fri, 5 Aug 2016 14:40:53 +0300 [thread overview]
Message-ID: <b98f3cfd-a8fa-f078-07f8-b06b803d82b2@cogentembedded.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1608051338000.2999@hadrien>
On 8/5/2016 2:38 PM, Julia Lawall wrote:
>>> 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/)
>>>
>>> // <smpl>
>>> @@
>>> expression e1,e2;
>>> statement S2,S1;
>>> @@
>>> - if (of_get_property(e1,e2,NULL))
>>> + if (of_property_read_bool(e1,e2))
>>> S1 else S2
>>> // </smpl>
>>>
>>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>>>
>>> ---
>>> 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;
>>
>> priv->is_little_endian = of_property_read_bool(pdev->dev.of_node,
>> "little-endian"));
>
> Thanks,
>
> I just sent a v2 with this change.
I've seen. Sorry, forgot to look at the followups before commenting...
> julia
MBR, Sergei
prev parent reply other threads:[~2016-08-05 11:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 8:56 [PATCH 00/11] use of_property_read_bool Julia Lawall
2016-08-05 8:56 ` [PATCH 08/11] net/fsl: " Julia Lawall
2016-08-05 9:30 ` Johannes Berg
2016-08-05 9:47 ` Julia Lawall
2016-08-05 10:08 ` Julia Lawall
2016-08-05 10:12 ` Johannes Berg
2016-08-05 10:14 ` Julia Lawall
2016-08-05 11:24 ` [PATCH 08/11 v2] " Julia Lawall
2016-08-05 11:35 ` [PATCH 08/11] " Sergei Shtylyov
2016-08-05 11:38 ` Julia Lawall
2016-08-05 11:40 ` Sergei Shtylyov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b98f3cfd-a8fa-f078-07f8-b06b803d82b2@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).