Re: [PATCH] usb: gadget: fsl_udc_core: remove mapped flag

2012-09-06 Thread Felipe Balbi
On Thu, Sep 06, 2012 at 04:32:28PM +0200, Enrico Scholz wrote: > Chen Peter-B29397 writes: > > > If the class driver has already mapped this address, the req->req.dma is not > > DMA_ADDR_INVALID either, in this case, the dma_sync_single_for_cpu is > > enough. > > ok; forget the patch then. fair

Re: [PATCH] usb: gadget: fsl_udc_core: remove mapped flag

2012-09-06 Thread Enrico Scholz
Chen Peter-B29397 writes: > If the class driver has already mapped this address, the req->req.dma is not > DMA_ADDR_INVALID either, in this case, the dma_sync_single_for_cpu is > enough. ok; forget the patch then. Thanks Enrico ___ Linuxppc-dev maili

Re: [PATCH] usb: gadget: fsl_udc_core: remove mapped flag

2012-09-05 Thread Felipe Balbi
Hi, On Tue, Sep 04, 2012 at 07:24:59PM +0200, Enrico Scholz wrote: > The 'mapped' flag in 'struct fsl_req' flag is redundant with checking > for 'req.dma != DMA_ADDR_INVALID' and it was also set to a wrong value you should not be using DMA_ADDR_INVALID anymore. Use the generic map/unmap routines

Re: [PATCH] usb: gadget: fsl_udc_core: remove mapped flag

2012-09-05 Thread Sergei Shtylyov
Hello. On 04-09-2012 21:24, Enrico Scholz wrote: The 'mapped' flag in 'struct fsl_req' flag is redundant with checking for 'req.dma != DMA_ADDR_INVALID' and it was also set to a wrong value (see 2nd hunk of patch). Replacing it in the way described above saves 60 bytes: function

RE: [PATCH] usb: gadget: fsl_udc_core: remove mapped flag

2012-09-04 Thread Chen Peter-B29397
> @@ -195,14 +195,13 @@ static void done(struct fsl_ep *ep, struct fsl_req > *req, int status) > dma_pool_free(udc->td_pool, curr_td, curr_td->td_dma); > } > > - if (req->mapped) { > + if (req->req.dma != DMA_ADDR_INVALID) { > dma_unmap_single(ep->udc->g