Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456996

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

From Julia Lawall <julia.lawall@lip6.fr>
Newsgroups linux.kernel
Subject Re: [PATCH 08/11] net/fsl: use of_property_read_bool
Date 2016-08-05 12:10 +0200
Message-ID <s2KeJ-65X-17@gated-at.bofh.it> (permalink)
References <s2Jsl-5yi-3@gated-at.bofh.it> <s2Jsm-5yi-25@gated-at.bofh.it> <s2JLH-5EJ-13@gated-at.bofh.it> <s2JLH-5EJ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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
> >  		priv->is_little_endian = false;
> >
>
> Perhaps, while changing this, that'd be better as
>
> 	priv->is_little_endian = of_property_read_bool(...);
>
> Obviously that would've worked before, but now it'd be even easier to
> understand, it seems.

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:

include/linux/fsl_devices.h:    unsigned        check_phy_clk_valid:1;

thanks,
julia

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 08/11] net/fsl: use of_property_read_bool Julia Lawall <Julia.Lawall@lip6.fr> - 2016-08-05 11:20 +0200
  Re: [PATCH 08/11] net/fsl: use of_property_read_bool Johannes Berg <johannes@sipsolutions.net> - 2016-08-05 11:40 +0200
    Re: [PATCH 08/11] net/fsl: use of_property_read_bool Julia Lawall <julia.lawall@lip6.fr> - 2016-08-05 11:50 +0200
    Re: [PATCH 08/11] net/fsl: use of_property_read_bool Julia Lawall <julia.lawall@lip6.fr> - 2016-08-05 12:10 +0200
      Re: [PATCH 08/11] net/fsl: use of_property_read_bool Julia Lawall <julia.lawall@lip6.fr> - 2016-08-05 12:20 +0200
      Re: [PATCH 08/11] net/fsl: use of_property_read_bool Johannes Berg <johannes@sipsolutions.net> - 2016-08-05 12:40 +0200
  [PATCH 08/11 v2] net/fsl: use of_property_read_bool Julia Lawall <julia.lawall@lip6.fr> - 2016-08-05 13:30 +0200
  Re: [PATCH 08/11] net/fsl: use of_property_read_bool Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-08-05 13:40 +0200
    Re: [PATCH 08/11] net/fsl: use of_property_read_bool Julia Lawall <julia.lawall@lip6.fr> - 2016-08-05 13:40 +0200
      Re: [PATCH 08/11] net/fsl: use of_property_read_bool Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-08-05 13:50 +0200

csiph-web