From: Ian Campbell Subject: Re: [PATCH v7 05/12] xen/arm: nr_lrs should be uint8_t Date: Wed, 23 Apr 2014 14:07:50 +0100 Message-ID: <1398258470.18537.99.camel@kazak.uk.xensource.com> References: <1396969969-18973-5-git-send-email-stefano.stabellini@eu.citrix.com> <1398257242.18537.84.camel@kazak.uk.xensource.com> <5357B7C2.600@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5357B7C2.600@linaro.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: Julien Grall Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2014-04-23 at 13:53 +0100, Julien Grall wrote: > On 04/23/2014 01:47 PM, Ian Campbell wrote: > > On Tue, 2014-04-08 at 16:12 +0100, Stefano Stabellini wrote: > >> A later patch is going to use uint8_t to keep track of LRs. > >> Both GICv3 and GICv2 don't need any more than an uint8_t to keep track > >> of the number of LRs. > > > > Did you confirm that this doesn't lead to inefficient loading and > > masking stuff on access? > > > >> Signed-off-by: Stefano Stabellini > >> Acked-by: Julien Grall > > > > If yes then: > > Acked-by: Ian Campbell > > > > Although TBH I'm not sure why unsigned int was so harmful here. > > In struct irq_pending (see next patch: #6) the lr is stored using an uint8. > > IHMO, the both variable should have the same type to avoid mistake. That could easily be avoided by a range check before setting nr_lrs, which we must have to do anyway. Ian.