[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211121134909.605cef5a@jic23-huawei>
Date: Sun, 21 Nov 2021 13:49:09 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Alexandru Ardelean <ardeleanalex@...il.com>
Cc: Paul Cercueil <paul@...pouillou.net>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
linux-iio <linux-iio@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: Re: [PATCH 08/15] iio: buffer-dma: split
iio_dma_buffer_fileio_free() function
On Tue, 16 Nov 2021 12:59:30 +0200
Alexandru Ardelean <ardeleanalex@...il.com> wrote:
> On Mon, Nov 15, 2021 at 4:20 PM Paul Cercueil <paul@...pouillou.net> wrote:
> >
> > From: Alexandru Ardelean <alexandru.ardelean@...log.com>
> >
> > A part of the logic in the iio_dma_buffer_exit() is required for the change
> > to add mmap support to IIO buffers.
> > This change splits the logic into a separate function, which will be
> > re-used later.
> >
>
> Not sure how the protocol is here, since my old @analog.com email
> isn't working anymore.
>
> But:
>
> Signed-off-by: Alexandru Ardelean <ardeleanalex@...il.com>
If you want to both document your email address change and make various scripts
find you more easily, send a patch for .mailmap
In meantime we can probably leave your original sign off in place but add
a Cc: with an up to date email address. That will reflect that the sign off
for this was (I assume) given back when you were at Analog.
>
> Thanks :)
> Alex
>
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
> > Signed-off-by: Paul Cercueil <paul@...pouillou.net>
> > ---
> > drivers/iio/buffer/industrialio-buffer-dma.c | 39 +++++++++++---------
> > 1 file changed, 22 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c b/drivers/iio/buffer/industrialio-buffer-dma.c
> > index eeeed6b2e0cf..eb8cfd3af030 100644
> > --- a/drivers/iio/buffer/industrialio-buffer-dma.c
> > +++ b/drivers/iio/buffer/industrialio-buffer-dma.c
> > @@ -358,6 +358,27 @@ int iio_dma_buffer_request_update(struct iio_buffer *buffer)
> > }
> > EXPORT_SYMBOL_GPL(iio_dma_buffer_request_update);
> >
> > +static void iio_dma_buffer_fileio_free(struct iio_dma_buffer_queue *queue)
> > +{
> > + unsigned int i;
> > +
> > + spin_lock_irq(&queue->list_lock);
> > + for (i = 0; i < ARRAY_SIZE(queue->fileio.blocks); i++) {
> > + if (!queue->fileio.blocks[i])
> > + continue;
> > + queue->fileio.blocks[i]->state = IIO_BLOCK_STATE_DEAD;
> > + }
> > + spin_unlock_irq(&queue->list_lock);
> > +
> > + for (i = 0; i < ARRAY_SIZE(queue->fileio.blocks); i++) {
> > + if (!queue->fileio.blocks[i])
> > + continue;
> > + iio_buffer_block_put(queue->fileio.blocks[i]);
> > + queue->fileio.blocks[i] = NULL;
> > + }
> > + queue->fileio.active_block = NULL;
> > +}
> > +
> > static void iio_dma_buffer_submit_block(struct iio_dma_buffer_queue *queue,
> > struct iio_dma_buffer_block *block)
> > {
> > @@ -681,25 +702,9 @@ EXPORT_SYMBOL_GPL(iio_dma_buffer_init);
> > */
> > void iio_dma_buffer_exit(struct iio_dma_buffer_queue *queue)
> > {
> > - unsigned int i;
> > -
> > mutex_lock(&queue->lock);
> >
> > - spin_lock_irq(&queue->list_lock);
> > - for (i = 0; i < ARRAY_SIZE(queue->fileio.blocks); i++) {
> > - if (!queue->fileio.blocks[i])
> > - continue;
> > - queue->fileio.blocks[i]->state = IIO_BLOCK_STATE_DEAD;
> > - }
> > - spin_unlock_irq(&queue->list_lock);
> > -
> > - for (i = 0; i < ARRAY_SIZE(queue->fileio.blocks); i++) {
> > - if (!queue->fileio.blocks[i])
> > - continue;
> > - iio_buffer_block_put(queue->fileio.blocks[i]);
> > - queue->fileio.blocks[i] = NULL;
> > - }
> > - queue->fileio.active_block = NULL;
> > + iio_dma_buffer_fileio_free(queue);
> > queue->ops = NULL;
> >
> > mutex_unlock(&queue->lock);
> > --
> > 2.33.0
> >
Powered by blists - more mailing lists