linux/drivers/dma
Kulikov Vasiliy b9033e682e dma: dmatest: fix potential sign bug
'cnt' is unsigned, so this code may become wrong in future as
dmatest_add_threads() can return error code:

	cnt = dmatest_add_threads(dtc, DMA_MEMCPY);
	thread_count += cnt > 0 ? cnt : 0;
		        ^^^^^^^

Now it can return only -EINVAL if and only if second argument of
dmatest_add_threads() is not one of DMA_MEMCPY, DMA_XOR, DMA_PQ.
So, now it is not wrong but may become wrong in future.

The semantic patch that finds this problem (many false-positive results):
(http://coccinelle.lip6.fr/)

// <smpl>
@ r1 @
identifier f;
@@
int f(...) { ... }

@@
identifier r1.f;
type T;
unsigned T x;
@@

*x = f(...)
 ...
*x > 0

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-08-04 14:27:47 -07:00
..
ioat ioat2: catch and recover from broken vtd configurations v6 2010-08-04 14:18:17 -07:00
ipu DMAENGINE: extend the control command to include an arg 2010-05-17 16:30:42 -07:00
ppc4xx of/dma: fix build breakage in ppc4xx adma driver 2010-06-02 21:02:39 -06:00
at_hdmac_regs.h at_hdmac: implement a private tx_list 2009-09-08 17:53:03 -07:00
at_hdmac.c Merge branch 'ioat' into dmaengine 2010-05-17 16:30:58 -07:00
coh901318_lli.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
coh901318_lli.h tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
coh901318.c DMAENGINE: add runtime slave control to COH 901 318 v3 2010-08-04 14:15:44 -07:00
dmaengine.c Merge branch 'ioat' into dmaengine 2010-05-17 16:30:58 -07:00
dmatest.c dma: dmatest: fix potential sign bug 2010-08-04 14:27:47 -07:00
dw_dmac_regs.h dw_dmac: implement a private tx_list 2009-09-08 17:53:02 -07:00
dw_dmac.c DMAENGINE: extend the control command to include an arg 2010-05-17 16:30:42 -07:00
fsldma.c Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
fsldma.h fsldma: major cleanups and fixes 2010-02-02 14:51:42 -07:00
intel_mid_dma_regs.h intel_mid: Add Mrst & Mfld DMA Drivers 2010-07-27 23:32:57 -07:00
intel_mid_dma.c intel_mid: Add Mrst & Mfld DMA Drivers 2010-07-27 23:32:57 -07:00
iop-adma.c Merge branch 'ioat' into dmaengine 2010-05-17 16:30:58 -07:00
iovlock.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig dmaengine: Driver for Topcliff PCH DMA controller 2010-08-04 14:12:05 -07:00
Makefile dmaengine: Driver for Topcliff PCH DMA controller 2010-08-04 14:12:05 -07:00
mpc512x_dma.c of/dma: mpc512x_dma.c: Fix build failures 2010-06-02 13:45:08 -06:00
mv_xor.c Merge branch 'ioat' into dmaengine 2010-05-17 16:30:58 -07:00
mv_xor.h mv_xor: implement a private tx_list 2009-09-08 17:53:03 -07:00
pch_dma.c dmaengine: Driver for Topcliff PCH DMA controller 2010-08-04 14:12:05 -07:00
pl330.c DMA: PL330: Add dma api driver 2010-05-23 20:28:19 -07:00
shdma.c sh: guard cookie consistency across termination in the DMA driver 2010-05-22 17:06:35 +09:00
shdma.h dmaengine: shdma: Introduce include/linux/sh_dma.h 2010-03-23 17:20:06 +09:00
ste_dma40_ll.c DMAENGINE: ste_dma40: allocate LCLA dynamically 2010-06-22 18:01:55 -07:00
ste_dma40_ll.h DMAENGINE: ste_dma40: allocate LCLA dynamically 2010-06-22 18:01:55 -07:00
ste_dma40.c DMAENGINE: add runtime slave config to DMA40 v3 2010-08-04 14:14:05 -07:00
timb_dma.c drivers/dma: Eliminate a NULL pointer dereference 2010-07-01 02:27:35 -07:00
txx9dmac.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2010-05-21 17:05:46 -07:00
txx9dmac.h txx9dmac: implement a private tx_list 2009-09-08 17:53:03 -07:00