From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] xsm/evtchn: Never pretend to have successfully created a Xen event channel Date: Mon, 19 Jan 2015 11:41:33 +0000 Message-ID: <54BCED6D.1040004@citrix.com> References: <1421664352-9488-1-git-send-email-andrew.cooper3@citrix.com> <54BCFA970200007800056681@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54BCFA970200007800056681@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 Cc: Keir Fraser , Ian Campbell , Ian Jackson , Tim Deegan , Xen-devel , Daniel De Graaf List-Id: xen-devel@lists.xenproject.org On 19/01/15 11:37, Jan Beulich wrote: >>>> On 19.01.15 at 11:45, wrote: >> --- a/xen/common/event_channel.c >> +++ b/xen/common/event_channel.c >> @@ -1155,21 +1155,25 @@ int alloc_unbound_xen_event_channel( >> >> spin_lock(&d->event_lock); >> >> - if ( (port = get_free_port(d)) < 0 ) >> + rc = get_free_port(d); >> + if ( rc < 0 ) >> goto out; >> + port = rc; > While this is kind of unrelated to the real change done in this patch, > I'm fine with it being here, but I wonder whether this shouldn't be > accompanied by a type change of "port" (to evtchn_port_t). There are a number of other places which could also do with similar typechanges for port (evtchn_from_port(), port_is_valid() etc). I would suggest that any such change be a separate patch. ~Andrew