[U-Boot] [PATCH 1/9] usb: Fix strict-aliasing warning in host/ohci-hcd.c

Simon Glass sjg at chromium.org
Sun Jan 8 19:02:59 CET 2012


Hi Mike,

On Sun, Jan 8, 2012 at 1:32 AM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Thursday 05 January 2012 22:54:49 Simon Glass wrote:
>>       len = min_t(int, len, leni);
>> -     if (data != databuf.ptr)
>> -             memcpy(data, databuf.ptr, len);
>> +     if (dataptr)
>> +             memcpy(data, dataptr, len);
>> +     else
>> +             memcpy(data, &databuf, len);
>
> this doesn't seem to be equivalent ?
> -mike

I believe it is if you look at the entire change, but I might have
missed something. dataptr is used only when we want to pull in the USB
descriptor info. Otherwise we use our local databuf union.

Regards,
Simon


More information about the U-Boot mailing list