[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 11/24] xen/arm: Let the toolstack configure the number of SPIs
On Fri, 2015-02-20 at 17:29 +0000, Julien Grall wrote: > On 20/02/15 16:08, Ian Campbell wrote: > > On Wed, 2015-01-28 at 18:26 +0000, Stefano Stabellini wrote: > > > >>> + int spi = irq - 32; > >> > >> unsigned int > > > > and underflow? > > No because there is a check (irq < 32) before using the variable spi. > It was more convenient to initialize it directly. You'd have to be sure that "irq - 32" wasn't undefined behaviour then, or the compiler can decide to omit the rest of the function, or perhaps just that second check, because things are undefined from the initialiser onwards. I think with unsigned you are probably ok. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |