[PATCH -next] dma-fence: Make symbol 'dma_fence_lockdep_map' static

Koenig, Christian Christian.Koenig at amd.com
Wed Jul 22 16:17:19 UTC 2020



Am 22.07.2020 18:04 schrieb Wei Yongjun <weiyongjun1 at huawei.com>:
The sparse tool complains as follows:

drivers/dma-buf/dma-fence.c:249:25: warning:
 symbol 'dma_fence_lockdep_map' was not declared. Should it be static?

This variable is not used outside of dma-fence.c, so this commit
marks it static.

Fixes: 5fbff813a4a3 ("dma-fence: basic lockdep annotations")
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

---
 drivers/dma-buf/dma-fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index af1d8ea926b3..43624b4ee13d 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -246,7 +246,7 @@ EXPORT_SYMBOL(dma_fence_context_alloc);
  *   concerned.
  */
 #ifdef CONFIG_LOCKDEP
-struct lockdep_map     dma_fence_lockdep_map = {
+static struct lockdep_map dma_fence_lockdep_map = {
         .name = "dma_fence_map"
 };



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200722/55053225/attachment-0001.htm>


More information about the dri-devel mailing list