From: "Jan Beulich" Subject: Re: [PATCH] linux: simplify and perform checking of multicall status Date: Thu, 05 Apr 2007 10:00:02 +0100 Message-ID: <4614D6B2.76E4.0078.0@novell.com> References: <4607FAD3.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 05.04.07 10:29 >>> >On 26/3/07 15:54, "Jan Beulich" wrote: > >> +static inline int >> +HYPERVISOR_multicall_check( >> + multicall_entry_t *call_list, int nr_calls, >> + const unsigned long *rc_list) >> +{ >> + int rc = HYPERVISOR_multicall(call_list, nr_calls); >> + >> + if (unlikely(rc == 0)) >> + return rc; > >ITYM unlikely(rc != 0)? Huh, indeed. And perhaps it should (give the rest of the function) even be if (unlikely(rc < 0)) return rc; BUG_ON(rc); (i.e. so that positive return values indicate the failed slot, negative ones indicate a failure of the multicall itself). Jan