From: Ian Campbell Subject: Re: [PATCH] xen: arm: correct return value of raw_copy_to_guest_* Date: Fri, 6 Dec 2013 17:03:48 +0000 Message-ID: <1386349428.25188.6.camel@kazak.uk.xensource.com> References: <1386343510-31974-1-git-send-email-ian.campbell@citrix.com> <52A1F4A1.5080201@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52A1F4A1.5080201@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2013-12-06 at 16:00 +0000, Julien Grall wrote: > > On 12/06/2013 03:25 PM, Ian Campbell wrote: > > This is a generic interface which is supposed to return the number of bytes > > which were not copied. Make it so and update the one incorrect caller. > > This is also the same for raw_clear_guest and raw_copy_from_guest. Oops, yes. > It seems the most of ARM code assume that these functions (or macro that > call them) will return a negative value if it's fails. Hrm, the ones I looked at all seemed to match the return the number of bytes not copied pattern (or more often just cared about 0 on success and !0 otherwise). Did you find some which aren't that way? In any case these functions are used from common code so we probably ought to match the interface. Ian.