diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-10 10:46:50 +0300 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:35:23 +0900 |
commit | a383e86539b8f04980a5806b33821522a7e3ee98 (patch) | |
tree | 8a19dab8cfafe7526ccf7f2cfa2790a09a102b81 /include | |
parent | 62cd4a40e911ae94ee82108622dbbf79b23af4b4 (diff) | |
download | linux-3.10-a383e86539b8f04980a5806b33821522a7e3ee98.tar.gz linux-3.10-a383e86539b8f04980a5806b33821522a7e3ee98.tar.bz2 linux-3.10-a383e86539b8f04980a5806b33821522a7e3ee98.zip |
dmaengine: make dma_submit_error() return an error code
The problem here is that the dma_xfer() functions in
drivers/ata/pata_arasan_cf.c and drivers/mtd/nand/fsmc_nand.c expect
dma_submit_error() to return an error code so they return 1 when they
intended to return a negative.
So far as I can tell, none of the ->tx_submit() functions ever do
return error codes so this patch should have no effect in the current
code.
I also changed it from a define to an inline.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Williams <djbw@fb.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dmaengine.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 99b4f593899..372183c1521 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -38,7 +38,10 @@ typedef s32 dma_cookie_t; #define DMA_MIN_COOKIE 1 #define DMA_MAX_COOKIE INT_MAX -#define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) +static inline int dma_submit_error(dma_cookie_t cookie) +{ + return cookie < 0 ? cookie : 0; +} /** * enum dma_status - DMA transaction status |