From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 1/7] xen/arm: fix rank calculation in vgic_vcpu_inject_irq Date: Sat, 27 Oct 2012 11:44:35 +0100 Message-ID: <1351334675.12176.13.camel@dagon.hellion.org.uk> References: <1351091027-20740-1-git-send-email-stefano.stabellini@eu.citrix.com> <1351157246.18035.129.camel@zakaz.uk.xensource.com> <1351269622.15162.105.camel@zakaz.uk.xensource.com> <1351284440.12176.9.camel@dagon.hellion.org.uk> <20121027100929.GA89901@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121027100929.GA89901@ocelot.phlegethon.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: Tim Deegan Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Sat, 2012-10-27 at 11:09 +0100, Tim Deegan wrote: > At 21:47 +0100 on 26 Oct (1351288040), Ian Campbell wrote: > > All the infrastructure will fall apart if b isn't a power of two, that's > > why I used the switch. Can you just add the appropriate case 1 instead? > > Probably the bug should be a call to an undefined function to make this > > a compile time rather than runtime failure too. > > BUILD_BUG_ON((b & -b) != b); ? Sure. Ian.