public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>,
	dri-devel@lists.freedesktop.org
Cc: kernel-dev@igalia.com, linux-media@vger.kernel.org,
	linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH 1/2] dma-fence: Silence sparse warning in dma_fence_describe
Date: Tue, 14 Apr 2026 20:28:38 +0200	[thread overview]
Message-ID: <1f9b6a4e-2494-488d-824c-bfac240ddd9f@amd.com> (raw)
In-Reply-To: <20260414154928.32934-1-tvrtko.ursulin@igalia.com>

On 4/14/26 17:49, Tvrtko Ursulin wrote:
> 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>

> ---
>  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();


  parent reply	other threads:[~2026-04-14 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14 15:49 [PATCH 1/2] dma-fence: Silence sparse warning in dma_fence_describe Tvrtko Ursulin
2026-04-14 15:49 ` [PATCH 2/2] dma-fence: Fix potential tracepoint null pointer dereferences Tvrtko Ursulin
2026-04-14 18:30   ` Christian König
2026-04-15  7:58     ` Tvrtko Ursulin
2026-04-15  8:13       ` Christian König
2026-04-15  8:33         ` Tvrtko Ursulin
2026-04-15  9:04           ` Christian König
2026-04-14 18:28 ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-15  8:32 [PATCH 1/2] dma-fence: Silence sparse warning in dma_fence_describe Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f9b6a4e-2494-488d-824c-bfac240ddd9f@amd.com \
    --to=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=tvrtko.ursulin@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox