lkml.org 
[lkml]   [2011]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH 1/3 v2] usb: tegra20-ehci: Add devicetree support.
> > +       retval = of_property_read_u32(dn, "hssync_start_delay",
> > +                                     (u32
> *)&phy_config->hssync_start_delay);
>
> Gah! Don't cast pointers that way. It will break badly if the sizes
> don't match. The variable *must* be a u32.

Can we have u16 and u8 versions of of_property_read, then? It'll simplify code. I'll be happy to submit a patch for that if that's what we want.--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-21 00:55    [W:0.198 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site