Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: "Liang Jie" <buaajxlj@163.com>,
	"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>,
	liangjie@lixiang.com, fanggeng@lixiang.com,
	yangchen11@lixiang.com
Subject: Re: [PATCH] iio: buffer: use dma_buf_unmap_attachment_unlocked() helper
Date: Sat, 15 Nov 2025 17:31:45 +0000	[thread overview]
Message-ID: <20251115173145.7eab1467@jic23-huawei> (raw)
In-Reply-To: <5cd213e377dbf6ff0fb24f92cefd0e4283375d17.camel@gmail.com>

On Fri, 14 Nov 2025 09:07:33 +0000
Nuno Sá <noname.nuno@gmail.com> wrote:

> 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>
Applied.

Thanks,

Jonathan

> 
> >  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-15 17:31 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á
2025-11-15 17:31   ` Jonathan Cameron [this message]

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=20251115173145.7eab1467@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=buaajxlj@163.com \
    --cc=dlechner@baylibre.com \
    --cc=fanggeng@lixiang.com \
    --cc=liangjie@lixiang.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noname.nuno@gmail.com \
    --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