From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 4 Jul 2012 18:21:15 +0200 Subject: [U-Boot] [PATCH 2/7] dfu:usb: DFU USB function (f_dfu) support for g_dnl composite gadget In-Reply-To: <20120704170456.302efc34@lmajewski.digital.local> References: <1341308291-14663-1-git-send-email-l.majewski@samsung.com> <201207041635.07670.marex@denx.de> <20120704170456.302efc34@lmajewski.digital.local> Message-ID: <201207041821.15341.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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