lkml.org 
[lkml]   [2018]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 23/24] fpga: dfl: afu: add user afu sub feature support
On Wed, Mar 21, 2018 at 06:50:54PM -0500, Alan Tull wrote:
> On Tue, Mar 20, 2018 at 2:10 AM, Wu Hao <hao.wu@intel.com> wrote:
>
> >> > +static int afu_mmap(struct file *filp, struct vm_area_struct *vma)
> >> > +{
> >> > + struct fpga_afu_region region;
> >> > + struct platform_device *pdev = filp->private_data;
> >> > + struct feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
> >> > + u64 size = vma->vm_end - vma->vm_start;
> >> > + u64 offset;
> >> > + int ret;
> >> > +
> >> > + if (!(vma->vm_flags & VM_SHARED))
> >> > + return -EINVAL;
> >> > +
> >> > + offset = vma->vm_pgoff << PAGE_SHIFT;
> >> > + ret = afu_get_region_by_offset(pdata, offset, size, &region);
>
> Most of the functions here are afu_region_*, but there's also
> afu_get_region_by_*. Better if afu_region_get_by_* to be consistent.

Agree, will fix it in the next version, thanks a lot for the comments.

Hao

\
 
 \ /
  Last update: 2018-03-22 05:52    [W:0.105 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site