On Thu, Mar 13, 2008 at 01:18:46AM +, Paul Brook wrote:
> > That's the '&' which is wrong here. The string can be accessed with
> > *((uint32_t *)devid). So you can simply use:
> >
> > ret = le32_to_cpu(*((uint32_t *)devid))
>
> No you can't. Even ignoring the aliasing violation, devid
> That's the '&' which is wrong here. The string can be accessed with
> *((uint32_t *)devid). So you can simply use:
>
> ret = le32_to_cpu(*((uint32_t *)devid))
No you can't. Even ignoring the aliasing violation, devid might not be
sufficiently aligned.
Paul
On Fri, Feb 22, 2008 at 06:16:25AM +0530, Vijay Kumar wrote:
> The mipsnet device returns wrong values for device ID, since it returns
> the contents of the pointer rather that the contents of the device ID
> string. Also the contents of the string is returned such that the order
> is host en
The mipsnet device returns wrong values for device ID, since it returns
the contents of the pointer rather that the contents of the device ID
string. Also the contents of the string is returned such that the order
is host endianess dependent. The patch fixes both these issues.
Signed-off-by: V