[PATCH] offb: make the screen properties endian safe
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Oct 31 13:08:27 EST 2013
On Wed, 2013-10-30 at 17:14 +0100, Cédric Le Goater wrote:
> @@ -552,25 +552,25 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
> if (pp == NULL)
> pp = of_get_property(dp, "depth", &len);
> if (pp && len == sizeof(u32))
> - depth = *pp;
> + depth = be32_to_cpu(*pp);
This is usually written as
depth = be32_to_cpup(pp);
It used to be that the latter generated better code but that might not
be the case anymore, however it's still a better alternative.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list