On 15/6/26 12:50, Peter Maydell wrote:
The GICv5PendingIrq struct representation of "there is no pending
interrupt" sets the prio field to PRIO_IDLE, and generally to avoid
confusion we also set the intid to 0.  We want to return this value
or initialize some variable to it in several places in the GICv5
implementation, and the support for the virtual interrupt domain
introduces more.

Define a convenience macro for this special-case struct value, and
use it instead of opencoding either the structure initializer or
explicit assignment to the two fields.

Signed-off-by: Peter Maydell <[email protected]>
---
  hw/intc/arm_gicv5.c               | 6 ++----
  include/hw/intc/arm_gicv5_types.h | 4 ++++
  target/arm/tcg/gicv5-cpuif.c      | 7 +++----
  3 files changed, 9 insertions(+), 8 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to