On Fri, 2015-10-16 at 08:20 +0200, Christophe JAILLET wrote:
Le 15/10/2015 08:36, Michael Ellerman a Ãcrit :Hi Christoph,
On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote:Hi,
Use 'of_property_read_u32()' instead ofThanks.
'of_get_property()'+pointer
dereference in order to avoid access to potentially freed memory.
Use 'of_get_next_parent()' to simplify the while() loop and avoid
the
need of a temp variable.
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
v2: Use of_property_read_u32 instead of of_get_property+pointer
dereference
*** Untested ***
Can someone with an mpc5xxx test this?
I don't think it is an issue, but while looking at another similar
patch, I noticed that the proposed patch adds a call to
be32_to_cpup()
(within of_property_read_u32).
Apparently, powerPC is a BE architecture, so this call should be a no
-op.
Just wanted to point it out, in case of.
I'm not sure I follow.
The device tree is always big endian, but of_property_read_u32() does
the
conversion to CPU endian for you already. That is one of the advantages
of
using it.
cheers