* [PATCH] arm64: use vma_pages helper
@ 2017-10-05 12:16 Allen Pais
2017-10-05 12:22 ` Robin Murphy
0 siblings, 1 reply; 3+ messages in thread
From: Allen Pais @ 2017-10-05 12:16 UTC (permalink / raw)
To: linux-arm-kernel
Use vma_pages function on vma object instead of explicit computation.
This is a clean up patch.
Signed-off-by: Allen Pais <allen.pais@oracle.com>
---
arch/arm64/mm/dma-mapping.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 614af88..5f62090 100644
--- 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_area_struct *vma,
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;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] arm64: use vma_pages helper
2017-10-05 12:16 [PATCH] arm64: use vma_pages helper Allen Pais
@ 2017-10-05 12:22 ` Robin Murphy
2017-10-05 12:23 ` Allen
0 siblings, 1 reply; 3+ messages in thread
From: Robin Murphy @ 2017-10-05 12:22 UTC (permalink / raw)
To: linux-arm-kernel
On 05/10/17 13:16, Allen Pais wrote:
> Use vma_pages function on vma object instead of explicit computation.
> This is a clean up patch.
A version of this is already queued for -next here:
https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h=for-next/core&id=b4f4a2755665bf847231050b569f587ce0945482
Thanks,
Robin.
> Signed-off-by: Allen Pais <allen.pais@oracle.com>
> ---
> arch/arm64/mm/dma-mapping.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> index 614af88..5f62090 100644
> --- 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_area_struct *vma,
> 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;
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arm64: use vma_pages helper
2017-10-05 12:22 ` Robin Murphy
@ 2017-10-05 12:23 ` Allen
0 siblings, 0 replies; 3+ messages in thread
From: Allen @ 2017-10-05 12:23 UTC (permalink / raw)
To: linux-arm-kernel
>> Use vma_pages function on vma object instead of explicit computation.
>> This is a clean up patch.
>
> A version of this is already queued for -next here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h=for-next/core&id=b4f4a2755665bf847231050b569f587ce0945482
>
Ah. Please ignore the patch.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-05 12:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-05 12:16 [PATCH] arm64: use vma_pages helper Allen Pais
2017-10-05 12:22 ` Robin Murphy
2017-10-05 12:23 ` Allen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).