From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Hao Subject: Re: [PATCH v4 23/24] fpga: dfl: afu: add user afu sub feature support Date: Thu, 22 Mar 2018 12:41:56 +0800 Message-ID: <20180322044156.GB8305@hao-dev> References: <1518513893-4719-1-git-send-email-hao.wu@intel.com> <1518513893-4719-24-git-send-email-hao.wu@intel.com> <20180320071037.GB31239@hao-dev> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Alan Tull Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, "Kang, Luwei" , "Zhang, Yi Z" , Xiao Guangrong , Tim Whisonant , Enno Luebbers , Shiva Rao , Christopher Rauer List-Id: linux-api@vger.kernel.org On Wed, Mar 21, 2018 at 06:50:54PM -0500, Alan Tull wrote: > On Tue, Mar 20, 2018 at 2:10 AM, Wu Hao 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, ®ion); > > 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