linux-sg2042/drivers/usb/dwc3
Christophe JAILLET 51fbc7c06c usb: dwc3: Fix size used in dma_free_coherent()
In commit 2abd9d5fa6 ("usb: dwc3: ep0: Add chained TRB support"), the
size of the memory allocated with 'dma_alloc_coherent()' has been modified
but the corresponding calls to 'dma_free_coherent()' have not been updated
accordingly.

This has been spotted with coccinelle, using the following script:
////////////////////
@r@
expression x0, x1, y0, y1, z0, z1, t0, t1, ret;
@@

*   ret = dma_alloc_coherent(x0, y0, z0, t0);
    ...
*   dma_free_coherent(x1, y1, ret, t1);

@script:python@
y0 << r.y0;
y1 << r.y1;

@@
if y1.find(y0) == -1:
 print "WARNING: sizes look different:  '%s'   vs   '%s'" % (y0, y1)
////////////////////

Fixes: 2abd9d5fa6 ("usb: dwc3: ep0: Add chained TRB support")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-10-17 12:35:48 +03:00
..
Kconfig usb: remove redundant dependency on USB_SUPPORT 2016-08-09 16:15:44 +02:00
Makefile usb: dwc3: remove dwc3-qcom in favor of dwc3-of-simple 2015-12-15 09:12:41 -06:00
core.c usb: patches for v4.9 merge window 2016-09-14 20:37:50 +02:00
core.h usb: dwc3: Fix dr_mode validation 2016-09-07 13:29:20 +03:00
debug.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debug.h usb: dwc3: debug: fix ep name on trace output 2016-08-25 10:36:25 +03:00
debugfs.c usb: dwc3: add DWC3_GUCTL1 reg for debug 2016-06-20 12:32:46 +03:00
dwc3-exynos.c usb: dwc3: exynos: Fix deferred probing storm. 2016-05-31 11:12:42 +03:00
dwc3-keystone.c usb: dwc3: keystone: drop dma_mask configuration 2016-04-06 16:36:01 +03:00
dwc3-of-simple.c usb: dwc3: of-simple: add compatible for Cavium 2016-09-13 09:28:59 +03:00
dwc3-omap.c usb: dwc3: omap: Pass VBUS and ID events transparently 2016-06-20 12:32:47 +03:00
dwc3-pci.c usb: dwc3: pci: fix build warning on !PM_SLEEP 2016-09-07 15:37:36 +03:00
dwc3-st.c - Final patches fixing Reset API change 2016-07-01 15:17:16 -07:00
ep0.c usb: dwc3: remove trailing newline from dwc3_trace 2016-06-20 12:32:48 +03:00
gadget.c usb: dwc3: Fix size used in dma_free_coherent() 2016-10-17 12:35:48 +03:00
gadget.h usb: dwc3: gadget: add a pointer to endpoint registers 2016-06-20 12:32:35 +03:00
host.c usb: dwc3: host: Fix broken XHCI host 2016-07-01 08:59:44 -07:00
io.h usb: dwc3: gadget: add a pointer to endpoint registers 2016-06-20 12:32:35 +03:00
trace.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
trace.h usb: dwc3: gadget: keep track of allocated and queued reqs 2016-06-20 12:32:49 +03:00
ulpi.c usb: dwc3: ulpi: make dwc3_ulpi_ops constant 2016-09-06 10:47:26 +03:00