From: "Jan Beulich" Subject: Re: [PATCH 5/5] hvm_complete_assist_req: Tell caller we failed to send Date: Fri, 30 Jan 2015 10:24:53 +0000 Message-ID: <54CB6A05020000780005B2D6@mail.emea.novell.com> References: <1422579150-6970-1-git-send-email-dslutz@verizon.com> <1422579150-6970-6-git-send-email-dslutz@verizon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1422579150-6970-6-git-send-email-dslutz@verizon.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant , Don Slutz Cc: Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 30.01.15 at 01:52, wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -2599,7 +2599,7 @@ static bool_t hvm_complete_assist_req(ioreq_t *p) > break; > } > > - return 1; > + return 0; /* implicitly bins the i/o operation */ > } This change points out that having hvm_complete_assist_req() be a separate function yet having only a single caller, and it returning non-void with only a single possible return value isn't the best arrangement. I think this should be brought back into hvm_send_assist_req(), by inverting the if() condition there. Unless there are intentions for it to have another caller, but in that case it should still be made return void, with the caller choosing what to return. Jan