Linux IIO development
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Liang Jie" <buaajxlj@163.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>
Cc: liangjie@lixiang.com, fanggeng@lixiang.com, yangchen11@lixiang.com
Subject: Re: [PATCH] iio: buffer: use dma_buf_unmap_attachment_unlocked() helper
Date: Fri, 14 Nov 2025 09:07:33 +0000	[thread overview]
Message-ID: <5cd213e377dbf6ff0fb24f92cefd0e4283375d17.camel@gmail.com> (raw)
In-Reply-To: <20251114084725.2079196-1-buaajxlj@163.com>

On Fri, 2025-11-14 at 16:47 +0800, Liang Jie wrote:
> From: Liang Jie <liangjie@lixiang.com>
> 
> Replace open-coded dma_resv_lock()/dma_resv_unlock() around
> dma_buf_unmap_attachment() in iio_buffer_dmabuf_release() with the
> dma_buf_unmap_attachment_unlocked() helper.
> 
> This aligns with the standard DMA-BUF API, avoids duplicating
> locking logic and eases future maintenance. No functional change.
> 
> Reviewed-by: fanggeng <fanggeng@lixiang.com>
> Signed-off-by: Liang Jie <liangjie@lixiang.com>
> ---

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

>  drivers/iio/industrialio-buffer.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index a80f7cc25a27..58330abbf40a 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -1563,9 +1563,7 @@ static void iio_buffer_dmabuf_release(struct kref *ref)
>  	struct iio_buffer *buffer = priv->buffer;
>  	struct dma_buf *dmabuf = attach->dmabuf;
>  
> -	dma_resv_lock(dmabuf->resv, NULL);
> -	dma_buf_unmap_attachment(attach, priv->sgt, priv->dir);
> -	dma_resv_unlock(dmabuf->resv);
> +	dma_buf_unmap_attachment_unlocked(attach, priv->sgt, priv->dir);
>  
>  	buffer->access->detach_dmabuf(buffer, priv->block);
>  

  reply	other threads:[~2025-11-14  9:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14  8:47 [PATCH] iio: buffer: use dma_buf_unmap_attachment_unlocked() helper Liang Jie
2025-11-14  9:07 ` Nuno Sá [this message]
2025-11-15 17:31   ` Jonathan Cameron

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=5cd213e377dbf6ff0fb24f92cefd0e4283375d17.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=andy@kernel.org \
    --cc=buaajxlj@163.com \
    --cc=dlechner@baylibre.com \
    --cc=fanggeng@lixiang.com \
    --cc=jic23@kernel.org \
    --cc=liangjie@lixiang.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=yangchen11@lixiang.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