Subject: Re: [PATCH] offb: make the screen properties endian safe

From: Benjamin Herrenschmidt <[email-masked]>
Date: Thu, 31 Oct 2013 13:08:27 +1100

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.