hw/ppc/openpic: Do not open-code ROUND_UP() macro
PATCH 1/1 hw/ppc/openpic: Do not open-code ROUND_UP() macro
While reviewing, the ROUND_UP() macro is easier to figure out. Besides, the comment confirms we want to round up here.
--- include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/ppc/openpic.h +1 -1
@@ -55,7 +55,7 @@ typedef enum IRQType {* Round up to the nearest 64 IRQs so that the queue length * won't change when moving between 32 and 64 bit hosts. */ -#define IRQQUEUE_SIZE_BITS ((OPENPIC_MAX_IRQ + 63) & ~63) +#define IRQQUEUE_SIZE_BITS ROUND_UP(OPENPIC_MAX_IRQ, 64) typedef struct IRQQueue { unsigned long *queue;
Signature · 1 line
2.38.1
Quoted 7 lines · Philippe Mathieu-Daudé
While reviewing, the
ROUND_UP()macro is easier to figure out. Besides, the comment confirms we want to round up here.Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
r~
Quoted 13 lines · Philippe Mathieu-Daudé
While reviewing, the
ROUND_UP()macro is easier to figure out. Besides, the comment confirms we want to round up here.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/hw/ppc/openpic.h +0
-0
include/hw/ppc/openpic.h typedef enum IRQType { · line 61
Quoted 8 lines
include/hw/ppc/openpic.h +1
-1@@ -55,7 +55,7 @@ typedef enum IRQType {* Round up to the nearest 64 IRQs so that the queue length * won't change when moving between 32 and 64 bit hosts. */ -#define IRQQUEUE_SIZE_BITS ((OPENPIC_MAX_IRQ + 63) & ~63) +#define IRQQUEUE_SIZE_BITS ROUND_UP(OPENPIC_MAX_IRQ, 64) typedef struct IRQQueue { unsigned long *queue;
ATB,
Mark.
There is no generic PPC section in MAINTAINERS covering include/hw/ppc/, so Cc'ing qemu-ppc@ manually.
Daniel, can you take this (reviewed) patch?
Thanks,
Phil.
Quoted 21 lines · Philippe Mathieu-Daudé
While reviewing, the
ROUND_UP()macro is easier to figure out. Besides, the comment confirms we want to round up here.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/hw/ppc/openpic.h +1
-1@@ -55,7 +55,7 @@ typedef enum IRQType {* Round up to the nearest 64 IRQs so that the queue length * won't change when moving between 32 and 64 bit hosts. */ -#define IRQQUEUE_SIZE_BITS ((OPENPIC_MAX_IRQ + 63) & ~63) +#define IRQQUEUE_SIZE_BITS ROUND_UP(OPENPIC_MAX_IRQ, 64) typedef struct IRQQueue { unsigned long *queue;
Daniel Henrique Barboza
AppliedQuoted 5 lines · Philippe Mathieu-Daudé
While reviewing, the
ROUND_UP()macro is easier to figure out. Besides, the comment confirms we want to round up here.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
Quoted 16 lines
include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/hw/ppc/openpic.h +1
-1@@ -55,7 +55,7 @@ typedef enum IRQType {* Round up to the nearest 64 IRQs so that the queue length * won't change when moving between 32 and 64 bit hosts. */ -#define IRQQUEUE_SIZE_BITS ((OPENPIC_MAX_IRQ + 63) & ~63) +#define IRQQUEUE_SIZE_BITS ROUND_UP(OPENPIC_MAX_IRQ, 64) typedef struct IRQQueue { unsigned long *queue;