Re: [RFC/PATCH 1/2] usb: gadget: add generic map/unmap request utilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Felipe Balbi | 2011-12-15 16:08:49 [+0200]:

>Hi,
Hi,

>> 
>> >+	if (req->num_mapped_sgs) {
>> >+		req->dma = DMA_ADDR_INVALID;
>> >+		dma_unmap_sg(&gadget->dev, req->sg, req->num_sgs,
>> >+				direction ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
>> 
>> No consistency here. Why you don't use num_mapped_sgs here? This looks
>> wrong.
>
>that's what was causing the Warning, did you not read the commit log ?
>On unmap, we must give the total number of entries.

Yeah, I read it. The thing is that I did not understand _why_ this can
happen and it looked like a duct tape patch me. Especially since the
sg_map() providers I checked returned the input value or an error code.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux