Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH 1/3] dma-fence: Silce sparse warning in dma_fence_describe
@ 2026-04-13 10:05 Tvrtko Ursulin
  2026-04-13 10:05 ` [PATCH 2/3] dma-fence: Fix potential tracepoint null pointer dereferences Tvrtko Ursulin
  2026-04-13 10:05 ` [PATCH 3/3] dma-fence: Init and enable signalling can use the fast path tracepoint Tvrtko Ursulin
  0 siblings, 2 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2026-04-13 10:05 UTC (permalink / raw)
  To: dri-devel
  Cc: kernel-dev, Tvrtko Ursulin, Christian König, linux-media,
	linaro-mm-sig

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
---
 drivers/dma-buf/dma-fence.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 1826ba73094c..a2aa82f4eedd 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -1037,8 +1037,8 @@ EXPORT_SYMBOL(dma_fence_set_deadline);
  */
 void dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)
 {
-	const char __rcu *timeline = "";
-	const char __rcu *driver = "";
+	const char __rcu *timeline = (const char __rcu *)"";
+	const char __rcu *driver = (const char __rcu *)"";
 	const char *signaled = "";
 
 	rcu_read_lock();
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-13 12:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 10:05 [PATCH 1/3] dma-fence: Silce sparse warning in dma_fence_describe Tvrtko Ursulin
2026-04-13 10:05 ` [PATCH 2/3] dma-fence: Fix potential tracepoint null pointer dereferences Tvrtko Ursulin
2026-04-13 11:32   ` Christian König
2026-04-13 12:26     ` Tvrtko Ursulin
2026-04-13 10:05 ` [PATCH 3/3] dma-fence: Init and enable signalling can use the fast path tracepoint Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox