All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro
@ 2023-05-23  6:15 Philippe Mathieu-Daudé
  2023-05-23 14:45 ` Richard Henderson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-05-23  6:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Cave-Ayland, qemu-trivial, 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é <philmd@linaro.org>
---
 include/hw/ppc/openpic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
index ebdaf8a493..bae8dafe16 100644
--- a/include/hw/ppc/openpic.h
+++ b/include/hw/ppc/openpic.h
@@ -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;
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro
  2023-05-23  6:15 [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro Philippe Mathieu-Daudé
@ 2023-05-23 14:45 ` Richard Henderson
  2023-05-25 16:08 ` Mark Cave-Ayland
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2023-05-23 14:45 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Mark Cave-Ayland, qemu-trivial

On 5/22/23 23:15, Philippe Mathieu-Daudé wrote:
> 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é<philmd@linaro.org>
> ---
>   include/hw/ppc/openpic.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro
  2023-05-23  6:15 [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro Philippe Mathieu-Daudé
  2023-05-23 14:45 ` Richard Henderson
@ 2023-05-25 16:08 ` Mark Cave-Ayland
  2023-06-02  9:29 ` Philippe Mathieu-Daudé
  2023-06-06 18:34 ` Daniel Henrique Barboza
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Cave-Ayland @ 2023-05-25 16:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial

On 23/05/2023 07:15, Philippe Mathieu-Daudé wrote:

> 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é <philmd@linaro.org>
> ---
>   include/hw/ppc/openpic.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
> index ebdaf8a493..bae8dafe16 100644
> --- a/include/hw/ppc/openpic.h
> +++ b/include/hw/ppc/openpic.h
> @@ -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;

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


ATB,

Mark.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro
  2023-05-23  6:15 [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro Philippe Mathieu-Daudé
  2023-05-23 14:45 ` Richard Henderson
  2023-05-25 16:08 ` Mark Cave-Ayland
@ 2023-06-02  9:29 ` Philippe Mathieu-Daudé
  2023-06-06 18:34 ` Daniel Henrique Barboza
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-02  9:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Cave-Ayland, qemu-trivial, qemu-ppc

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.

On 23/5/23 08:15, Philippe Mathieu-Daudé wrote:
> 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é <philmd@linaro.org>
> ---
>   include/hw/ppc/openpic.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
> index ebdaf8a493..bae8dafe16 100644
> --- a/include/hw/ppc/openpic.h
> +++ b/include/hw/ppc/openpic.h
> @@ -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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro
  2023-05-23  6:15 [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2023-06-02  9:29 ` Philippe Mathieu-Daudé
@ 2023-06-06 18:34 ` Daniel Henrique Barboza
  3 siblings, 0 replies; 5+ messages in thread
From: Daniel Henrique Barboza @ 2023-06-06 18:34 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Mark Cave-Ayland, qemu-trivial



On 5/23/23 03:15, Philippe Mathieu-Daudé wrote:
> 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é <philmd@linaro.org>
> ---


Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,


Daniel

>   include/hw/ppc/openpic.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
> index ebdaf8a493..bae8dafe16 100644
> --- a/include/hw/ppc/openpic.h
> +++ b/include/hw/ppc/openpic.h
> @@ -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;


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-06 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23  6:15 [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro Philippe Mathieu-Daudé
2023-05-23 14:45 ` Richard Henderson
2023-05-25 16:08 ` Mark Cave-Ayland
2023-06-02  9:29 ` Philippe Mathieu-Daudé
2023-06-06 18:34 ` Daniel Henrique Barboza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.