diff options
author | Dave Jiang <dave.jiang@intel.com> | 2015-08-25 15:58:05 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-08-25 22:23:58 -0400 |
commit | 5c65cb93a3d066f52a109552572304675d5a52fc (patch) | |
tree | d6d763160a9a56ef042e1c4527db310d6889dba4 | |
parent | 4d112426c3446d94b9bc56396075524b06913b1c (diff) |
dmaengine: ioatdma: fix sparse "error" with prep lock
The prep lock gets acquired in ioat_check_space_lock and released in
ioat_tx_submit_unlock. Setting the annotations so sparse does not freak out.
drivers/dma/ioat/dma.c:273:30: sparse: context imbalance in 'ioat_tx_submit_unlock' - unexpected unlock
drivers/dma/ioat/dma.c:476:5: sparse: context imbalance in 'ioat_check_space_lock' - wrong count at exit
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/ioat/dma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 50d0112b602a..f66b7e640610 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -262,6 +262,7 @@ static int ioat_reset_sync(struct ioatdma_chan *ioat_chan, unsigned long tmo) | |||
262 | } | 262 | } |
263 | 263 | ||
264 | static dma_cookie_t ioat_tx_submit_unlock(struct dma_async_tx_descriptor *tx) | 264 | static dma_cookie_t ioat_tx_submit_unlock(struct dma_async_tx_descriptor *tx) |
265 | __releases(&ioat_chan->prep_lock) | ||
265 | { | 266 | { |
266 | struct dma_chan *c = tx->chan; | 267 | struct dma_chan *c = tx->chan; |
267 | struct ioatdma_chan *ioat_chan = to_ioat_chan(c); | 268 | struct ioatdma_chan *ioat_chan = to_ioat_chan(c); |
@@ -474,6 +475,7 @@ static bool reshape_ring(struct ioatdma_chan *ioat_chan, int order) | |||
474 | * @num_descs: allocation length | 475 | * @num_descs: allocation length |
475 | */ | 476 | */ |
476 | int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs) | 477 | int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs) |
478 | __acquires(&ioat_chan->prep_lock) | ||
477 | { | 479 | { |
478 | bool retry; | 480 | bool retry; |
479 | 481 | ||