Message ID | 20190722073025.20844-4-anton.ivanov@cambridgegreys.com |
---|---|
State | Not Applicable |
Headers | show |
Series | None | expand |
On Mon, 2019-07-22 at 08:30 +0100, anton.ivanov@cambridgegreys.com wrote: > From: Anton Ivanov <anton.ivanov@cambridgegreys.com> > > Fix an off-by-one in IRQ enumeration > > Reported by: Dana Johnson <djohns042@gmail.com> nit: "Reported-by" > -#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ) > +#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ - 1) Somebody internally at my group just made the same patch, but came to the cnoclusion that we also need, in arch/um/kernel/irq.c: - for (i = 1; i < LAST_IRQ; i++) + for (i = 1; i <= LAST_IRQ; i++) in init_IRQ()? johannes
diff --git a/arch/um/include/asm/irq.h b/arch/um/include/asm/irq.h index 49ed3e35b35a..ce7a78c3bcf2 100644 --- a/arch/um/include/asm/irq.h +++ b/arch/um/include/asm/irq.h @@ -23,7 +23,7 @@ #define VECTOR_BASE_IRQ 15 #define VECTOR_IRQ_SPACE 8 -#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ) +#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ - 1) #else