Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: buffer-dma: Use lockdep for locking annotations

Don't use mutex_is_locked() + WARN_ON() for checking if a specif lock is
taken. Instead use the existing annotations which means
lockdep_assert_held().

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
09ccc1b6 0a272aaf

+2 -1
+2 -1
drivers/iio/buffer/industrialio-buffer-dma.c
··· 6 6 7 7 #include <linux/atomic.h> 8 8 #include <linux/cleanup.h> 9 + #include <linux/lockdep.h> 9 10 #include <linux/slab.h> 10 11 #include <linux/kernel.h> 11 12 #include <linux/module.h> ··· 765 764 bool cookie; 766 765 int ret; 767 766 768 - WARN_ON(!mutex_is_locked(&queue->lock)); 767 + lockdep_assert_held(&queue->lock); 769 768 770 769 cookie = dma_fence_begin_signalling(); 771 770