[U-Boot] [PATCH 2/7] dfu:usb: DFU USB function (f_dfu) support for g_dnl composite gadget

Marek Vasut marex at denx.de
Wed Jul 4 18:21:15 CEST 2012


Dear Lukasz Majewski,

[...]

> > > > Now ... this is ubercrazy ... can't this be made without this
> > > > typecasting voodoo?
> > > 
> > > The problem is that req->buf is a void pointer. And the goal is to
> > > store dfu state at 8 bits.
> > 
> > Sure, but why not make the buffer u8 ?
> 
> The req->buf is a member of usb_request defined at gadget.h.
> 
> It represents the request from USB. I cannot guarantee, that we will
> always regard data pointed by buf as u8. For flexibility of gadget
> usage it is safer to leave it as void pointer.

OK, then it's good :)

[...]

Best regards,
Marek Vasut


More information about the U-Boot mailing list