Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Sergei Shtylyov
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/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (o

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Sergei Shtylyov wrote: > Hello. > > On 8/5/2016 11:56 AM, 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/) > > > > // > > @@ > > exp

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Sergei Shtylyov
Hello. On 8/5/2016 11:56 AM, 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/) // @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) +

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Johannes Berg
On Fri, 2016-08-05 at 12:08 +0200, Julia Lawall wrote: >  > Can I do the same for: > > if (of_property_read_bool(np, "phy-clk-valid")) >     pdata->check_phy_clk_valid = 1; > else >     pdata->check_phy_clk_valid = 0; > > The type is not bool, but: > > inc

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Johannes Berg wrote: > On Fri, 2016-08-05 at 12:08 +0200, Julia Lawall wrote: > >  > > Can I do the same for: > > > > if (of_property_read_bool(np, "phy-clk-valid")) > >     pdata->check_phy_clk_valid = 1; > > else > >     pdata->check_

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Johannes Berg wrote: > > > - 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 > >   pr

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
On Fri, 5 Aug 2016, Johannes Berg wrote: > > > - 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 > >   pr

Re: [PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Johannes Berg
> - 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; > Perhaps, whil

[PATCH 08/11] net/fsl: use of_property_read_bool

2016-08-05 Thread Julia Lawall
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