From: Ian Campbell Subject: Re: [PATCH 5/5] xen: arm: fix guest register access. Date: Tue, 18 Dec 2012 20:52:37 +0000 Message-ID: <1355863957.28610.40.camel@dagon.hellion.org.uk> References: <1355849351.14620.274.camel@zakaz.uk.xensource.com> <1355849376-26652-5-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "Tim (Xen.org)" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-12-18 at 18:40 +0000, Stefano Stabellini wrote: > > + case 8 ... 12: /* Register banked in FIQ mode */ > > + BUILD_BUG_ON(REGOFFS(r8_fiq) + 4*sizeof(uint32_t) != REGOFFS(r12_fiq)); > > + if ( fiq_mode(regs) ) > > + return ®s->r8_fiq + reg - 8; > > + else > > + return ®s->r8_fiq + reg - 8; > > what's the point of this if? Oops, the else case shouldn't have the _fiq suffix! (seriously, please can you start trimming your quotes! I nearly missed this single line comment among the 100 lines you needlessly quoted) Ian.