[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201119011614.GB136599@KEI>
Date: Thu, 19 Nov 2020 10:16:14 +0900
From: Hyesoo Yu <hyesoo.yu@...sung.com>
To: Hillf Danton <hdanton@...a.com>
Cc: Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>, john.stultz@...aro.org,
linux-media@...r.kernel.org
Subject: Re: [PATCH 3/4] dma-buf: heaps: add chunk heap to dmabuf heaps
Hello, Hillf danton.
On Wed, Nov 18, 2020 at 05:00:13PM +0800, Hillf Danton wrote:
> On Tue, 17 Nov 2020 10:19:34 -0800 Minchan Kim wrote:
> +
> +static int chunk_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
> +{
> + struct chunk_heap_buffer *buffer = dmabuf->priv;
> + struct sg_table *table = &buffer->sg_table;
> + unsigned long addr = vma->vm_start;
> + struct sg_page_iter piter;
> + int ret;
> +
> + for_each_sgtable_page(table, &piter, vma->vm_pgoff) {
> + struct page *page = sg_page_iter_page(&piter);
> +
> + ret = remap_pfn_range(vma, addr, page_to_pfn(page), PAGE_SIZE,
> + vma->vm_page_prot);
> + if (ret)
> + return ret;
> + addr = PAGE_SIZE;
>
> Typo?
> addr += PAGE_SIZE;
>
Yes, It is typo. I will change it.
Thanks for your review.
Regards.
> + if (addr >= vma->vm_end)
> + return 0;
> + }
> + return 0;
> +}
>
Powered by blists - more mailing lists