[U-Boot] [PATCH 4/4] USB:gadget:designware Fix memory nonalignment issue
Amit Virdi
amit.virdi at st.com
Wed Mar 7 08:04:55 CET 2012
Hey Mike,
On 3/6/2012 9:39 PM, Mike Frysinger wrote:
> On Thursday 16 February 2012 07:03:38 Amit Virdi wrote:
>> --- a/drivers/usb/gadget/designware_udc.c
>> +++ b/drivers/usb/gadget/designware_udc.c
>>
>> + /* copy back tmp buffer to bufp if bufp is not word aligned */
>> + if ((int)bufp& 0x3) {
>> + bytp = (u8 *)&tmp[0];
>> + for (i = 0; i< len; i++)
>> + bufp[i] = bytp[i];
>> + }
>
> memcpy(bufp, tmp, len) ?
Yes, memcpy can be used. I'll amend the code.
Thanks
Amit Virdi
More information about the U-Boot
mailing list