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

Marek Vasut
2012-07-04T16:21:15Z

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