Message ID | 1467914058-30551-3-git-send-email-nikunj@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jul 07, 2016 at 11:24:16PM +0530, Nikunj A Dadhania wrote: > From: Benjamin Herrenschmidt <benh@kernel.crashing.org> > > This will make life easier for dealing with dynamically configured > ICSes such as PHB3 > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > Reviewed-by: David Gibson <david@gibson.dropbear.id.au> > Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> This doesn't do anything without the ics list change, but it's also harmless, so I've merged it to ppc-for-2.7. > --- > include/hw/ppc/xics.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h > index 6ad3057..8c22daf 100644 > --- a/include/hw/ppc/xics.h > +++ b/include/hw/ppc/xics.h > @@ -150,7 +150,7 @@ struct ICSState { > > static inline bool ics_valid_irq(ICSState *ics, uint32_t nr) > { > - return (nr >= ics->offset) > + return (ics->offset != 0) && (nr >= ics->offset) > && (nr < (ics->offset + ics->nr_irqs)); > } >
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 6ad3057..8c22daf 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -150,7 +150,7 @@ struct ICSState { static inline bool ics_valid_irq(ICSState *ics, uint32_t nr) { - return (nr >= ics->offset) + return (ics->offset != 0) && (nr >= ics->offset) && (nr < (ics->offset + ics->nr_irqs)); }