Received: by 10.213.65.68 with SMTP id h4csp370160imn; Wed, 21 Mar 2018 21:54:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELvEU8OJ1FAciDFaZ9zzSrlXPNI2xPu0YP5jj8Ab0pEArEbzj2toDn/W0tYiFGMdbWUXfpJo X-Received: by 10.98.57.143 with SMTP id u15mr19167200pfj.79.1521694484466; Wed, 21 Mar 2018 21:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521694484; cv=none; d=google.com; s=arc-20160816; b=vmP5HO6TyFh42rw0BIyKn92fgj4z00SiXDnLTr2yw2hnGPRpDppODRN4EMcAfQ2Iyf 8S9DqgQXTVKPTjMXrXj32G17FkIRgiEXMgINZJUP4/rX/mpw+n7dPkU+yg2KUqs1lVo2 MW+QlM/e9qr8RhprZqKJHNcBSi/fIhi+6TZ8xlLxIE1dLcB7O4s5Bh1MLYV1D6VuxErF KXY9TJj4/tMOeHCpTpNJyPfKavs9P12ss7rVTM0Ra5q2YkUyQaC1bNK6EsEA/d16+2hL UbbWzhJ/bWUWnA5Fl53njfZM1C7d72F0unVJ4JhZwcKkrqJBQPoamVPk4eQ/5V5smPWP sIDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=nRG0k1ev3vxtjdRomKEwlwdFR+NxKeyR5WtTGhA6yGg=; b=aIHIv6ZSNJ5BCjrUDlo7Azjo5EyVH/Z9TeIhIcS1vFu3v5s1ki9wi8yPe0Ooz3HcZK 6You5QUJudcnuV3+iDLf2zndti0o/OpGEd/QITWxoucn8YqtseqnPRo44RvGot05gDGy moiK7NAn6PKq1VVtbgc3PotjrqrW9p/1CiD49qGXbGrnULFQ1ISrHvi9oU5p+yERi+lb PvJlfa+TSWoVTgWkKrFu8woSGKKn3sFLdoA7RPe2D/auS1B6GvKqclNuGC7UBwLioiff 3ZtqwW3QYXcn5a7hA/pl6kUydiLEz/Zp7r7lcdB3ToB0M0n4LHD/YmQIk6L+2RrTK/lx wWVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si3781611pgs.281.2018.03.21.21.54.30; Wed, 21 Mar 2018 21:54:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbeCVEwA (ORCPT + 99 others); Thu, 22 Mar 2018 00:52:00 -0400 Received: from mga04.intel.com ([192.55.52.120]:3936 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbeCVEv5 (ORCPT ); Thu, 22 Mar 2018 00:51:57 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2018 21:51:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,342,1517904000"; d="scan'208";a="30196646" Received: from hao-dev.bj.intel.com (HELO localhost) ([10.238.157.61]) by fmsmga002.fm.intel.com with ESMTP; 21 Mar 2018 21:51:54 -0700 Date: Thu, 22 Mar 2018 12:41:56 +0800 From: Wu Hao 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 Subject: Re: [PATCH v4 23/24] fpga: dfl: afu: add user afu sub feature support 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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