[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240204101903.GA916983@kernel.org>
Date: Sun, 4 Feb 2024 10:19:03 +0000
From: Simon Horman <horms@...nel.org>
To: Chris Leech <cleech@...hat.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nilesh Javali <njavali@...vell.com>, Christoph Hellwig <hch@....de>,
John Meneghini <jmeneghi@...hat.com>, Lee Duncan <lduncan@...e.com>,
Mike Christie <michael.christie@...cle.com>,
Hannes Reinecke <hare@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
GR-QLogic-Storage-Upstream@...vell.com
Subject: Re: [PATCH v5 4/4] uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion
On Thu, Feb 01, 2024 at 03:34:00PM -0800, Chris Leech wrote:
> Conversion of this driver to use UIO_MEM_DMA_COHERENT for
> dma_alloc_coherent memory instead of UIO_MEM_PHYS.
>
> Signed-off-by: Chris Leech <cleech@...hat.com>
> ---
> drivers/uio/uio_dmem_genirq.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c
..
> @@ -264,7 +257,8 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
> " dynamic and fixed memory regions.\n");
> break;
> }
> - uiomem->memtype = UIO_MEM_PHYS;
> + uiomem->memtype = UIO_MEM_DMA_COHERENT;
> + uiomem->dma_device = &pdev->dev,
Hi Chris,
a nit from my side.
Probably the ',' would be better written as a ';' here.
I don't think this is a bug, but using comma like this is
somewhat unexpected and confusing.
Flagged by clang-17 with -Wcomma
> uiomem->addr = DMEM_MAP_ERROR;
> uiomem->size = pdata->dynamic_region_sizes[i];
> ++uiomem;
> --
> 2.43.0
>
>
Powered by blists - more mailing lists