From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 10/13] xen/events: Refactor evtchn_to_irq array to be dynamically allocated Date: Thu, 26 Sep 2013 08:51:34 -0400 Message-ID: <20130926125133.GF5792@konrad-lan.dumpdata.com> References: <1379091601-30358-1-git-send-email-david.vrabel@citrix.com> <1379091601-30358-11-git-send-email-david.vrabel@citrix.com> <20130924145819.GI4712@phenom.dumpdata.com> <52441213.5050808@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <52441213.5050808@citrix.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: David Vrabel Cc: Boris Ostrovsky , Malcolm Crossley , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Sep 26, 2013 at 11:53:07AM +0100, David Vrabel wrote: > On 24/09/13 15:58, Konrad Rzeszutek Wilk wrote: > > On Fri, Sep 13, 2013 at 05:59:58PM +0100, David Vrabel wrote: > >> From: Malcolm Crossley > >> > >> Refactor static array evtchn_to_irq array to be dynamically allocated by > >> implementing get and set functions for accesses to the array. > >> > >> Two new port ops are added: max_channels (maximum supported number of > >> event channels) and nr_channels (number of currently usable event > >> channels). For the N-level ABI, these numbers are both the same as > >> the shared data structure is a fixed size. For the FIFO ABI, these > > ^^ has > > I think either usage is fine. > > >> + if (evtchn_to_irq[row] == NULL) { > >> + /* Unallocated irq entries return -1 anyway */ > > ^^^^^ - are > > Unallocated entries can't have a value because they're, well, > unallocated. So I think the original phrasing is more correct. But right after that you have 'return 0;' which threw me out. > > "get_evtchn_to_irq() returns -1 for unallocated entries anyway" would be > slighter better though. That would do it too. > > David > > ps. Can you also trim your replies in future? As in between the grammar > nit-picking there was an actual bug that needed fixing and this is hard > to find with the untrimmed quoting.