[PATCH 2/2] fsl/embedded6xx: don't cast the result of of_get_property

Stephen Rothwell sfr at canb.auug.org.au
Wed Sep 26 10:44:19 EST 2007


On Fri, 14 Sep 2007 15:46:40 +1000 Jeremy Kerr <jk at ozlabs.org> wrote:
>
> -	avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
> -	phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
> +	phys_addr = of_get_property(avr, "reg", &len);
> +	avr_clock_prop = of_get_property(avr, "clock-frequency", &len);

If you don't use the value of the len variable, then you can pass NULL to
of_get_property.

> +	if (!avr_clock || !phys_addr[0])

Not *phys_addr?

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070926/703c0a47/attachment.pgp>


More information about the Linuxppc-dev mailing list