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.

dma-fence: Silence sparse warning in dma_fence_describe

Sparse complains about assigning a string to a __rcu annotated local
variable:

drivers/dma-buf/dma-fence.c:1040:38: warning: incorrect type in initializer (different address spaces)
drivers/dma-buf/dma-fence.c:1040:38: expected char const [noderef] __rcu *timeline
drivers/dma-buf/dma-fence.c:1040:38: got char *
drivers/dma-buf/dma-fence.c:1041:36: warning: incorrect type in initializer (different address spaces)
drivers/dma-buf/dma-fence.c:1041:36: expected char const [noderef] __rcu *driver
drivers/dma-buf/dma-fence.c:1041:36: got char *

It is harmless but lets silence it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: ac364014fd81 ("dma-buf: cleanup dma_fence_describe v3")
Cc: Christian König <christian.koenig@amd.com>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260415083207.40513-1-tvrtko.ursulin@igalia.com

authored by

Tvrtko Ursulin and committed by
Tvrtko Ursulin
7daff375 be19b43f

+2 -2
+2 -2
drivers/dma-buf/dma-fence.c
··· 1021 1021 */ 1022 1022 void dma_fence_describe(struct dma_fence *fence, struct seq_file *seq) 1023 1023 { 1024 - const char __rcu *timeline = ""; 1025 - const char __rcu *driver = ""; 1024 + const char __rcu *timeline = (const char __rcu *)""; 1025 + const char __rcu *driver = (const char __rcu *)""; 1026 1026 const char *signaled = ""; 1027 1027 1028 1028 rcu_read_lock();