qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] mipsnet incorrect device ID fix


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH] mipsnet incorrect device ID fix
Date: Thu, 13 Mar 2008 02:54:00 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Thu, Mar 13, 2008 at 01:18:46AM +0000, 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 might not be 
> sufficiently aligned.
> 

Oops you are right, I have been troubled by the original code. As
suggested by Paul on IRC, the best is most probably to hardcode the
hex values and put the string on a comment.

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]