[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d4fa6de-f8e2-f073-cfc8-ce78947ad599@arm.com>
Date: Tue, 26 Sep 2017 12:57:15 +0100
From: Robin Murphy <robin.murphy@....com>
To: Thomas Meyer <thomas@...3r.de>, catalin.marinas@....com,
will.deacon@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] arm64: Cocci spatch "vma_pages"
On 20/09/17 23:29, Thomas Meyer wrote:
> Use vma_pages function on vma object instead of explicit computation.
> Found by coccinelle spatch "api/vma_pages.cocci"
Reviewed-by: Robin Murphy <robin.murphy@....com>
I guess this can be picked up independently of the other patches?
Robin.
> Signed-off-by: Thomas Meyer <thomas@...3r.de>
> ---
>
> diff -u -p a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> --- a/arch/arm64/mm/dma-mapping.c
> +++ b/arch/arm64/mm/dma-mapping.c
> @@ -303,8 +303,7 @@ static int __swiotlb_mmap_pfn(struct vm_
> unsigned long pfn, size_t size)
> {
> int ret = -ENXIO;
> - unsigned long nr_vma_pages = (vma->vm_end - vma->vm_start) >>
> - PAGE_SHIFT;
> + unsigned long nr_vma_pages = vma_pages(vma);
> unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
> unsigned long off = vma->vm_pgoff;
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Powered by blists - more mailing lists