android_kernel_oneplus_msm8998/drivers/usb/dwc3
Christophe JAILLET 93fe5c7bb4 usb: dwc3: Fix size used in dma_free_coherent()
commit 51fbc7c06c8900370c6da5fc4a4685add8fa4fb0 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 16:36:37 +01:00
..
core.c
core.h
debug.c
debug.h
debugfs.c
dwc3-exynos.c
dwc3-keystone.c
dwc3-omap.c
dwc3-pci.c usb: dwc3: pci: add Intel Kabylake PCI ID 2016-09-07 08:32:38 +02:00
dwc3-qcom.c
dwc3-st.c
ep0.c
gadget.c usb: dwc3: Fix size used in dma_free_coherent() 2016-11-10 16:36:37 +01:00
gadget.h
host.c
io.h
Kconfig
Makefile
platform_data.h
trace.c
trace.h
ulpi.c