From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 2/3] grant-table: refactor grant copy to reduce duplicate code Date: Thu, 22 Jan 2015 14:42:31 +0000 Message-ID: <54C10C57.1090406@citrix.com> References: <1421777990-1122-1-git-send-email-david.vrabel@citrix.com> <1421777990-1122-3-git-send-email-david.vrabel@citrix.com> <54C11628020000780005831F@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YEJ1I-0001Un-4a for xen-devel@lists.xenproject.org; Thu, 22 Jan 2015 14:46:04 +0000 In-Reply-To: <54C11628020000780005831F@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , David Vrabel Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 22/01/15 14:24, Jan Beulich wrote: >>>> On 20.01.15 at 19:19, wrote: >> +static int gnttab_copy_buf(const struct gnttab_copy *op, >> + struct gnttab_copy_buf *dest, >> + const struct gnttab_copy_buf *src) >> +{ >> + s16 rc; > > An s16 local variable used as return value in a function returning > int is kind of odd. Elsewhere there are also cases where the > function return types are also s16. I don't think that's particularly > efficient, and hence I think it should be changed in the places > where you add new helpers even if the original code used s16 > for that purpose. I was (trying to) use s16 where we return a GNTST_* value instead of the usual -ERRNO. I can change them all to int if this is preferred (although I not sure I get your efficiency argument). >> - gnttab_mark_dirty(dd, d_frame); > > This one doesn't reappear anywhere. Oops! David