diff mbox series

[5/5] ppc/pnv: Remove usless checks in set_irq handlers

Message ID 20220323072846.1780212-6-clg@kaod.org
State New
Headers show
Series ppc/pnv: Introduce GPIO lines to drive the PSIHB device | expand

Commit Message

Cédric Le Goater March 23, 2022, 7:28 a.m. UTC
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv_psi.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Daniel Henrique Barboza March 24, 2022, 6:02 p.m. UTC | #1
Typo in the commit title: s/usless/useless




On 3/23/22 04:28, Cédric Le Goater wrote:
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>   hw/ppc/pnv_psi.c | 10 ----------
>   1 file changed, 10 deletions(-)
> 
> diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
> index 950ecca40573..98045ed3d249 100644
> --- a/hw/ppc/pnv_psi.c
> +++ b/hw/ppc/pnv_psi.c
> @@ -219,11 +219,6 @@ static void pnv_psi_power8_set_irq(void *opaque, int irq, int state)
>       uint32_t src;
>       bool masked;
>   
> -    if (irq > PSIHB_IRQ_EXTERNAL) {
> -        qemu_log_mask(LOG_GUEST_ERROR, "PSI: Unsupported irq %d\n", irq);
> -        return;
> -    }
> -
>       xivr_reg = xivr_regs[irq];
>       stat_reg = stat_regs[irq];
>   
> @@ -813,11 +808,6 @@ static void pnv_psi_power9_set_irq(void *opaque, int irq, int state)
>       PnvPsi *psi = opaque;
>       uint64_t irq_method = psi->regs[PSIHB_REG(PSIHB9_INTERRUPT_CONTROL)];
>   
> -    if (irq > PSIHB9_NUM_IRQS) {
> -        qemu_log_mask(LOG_GUEST_ERROR, "PSI: Unsupported irq %d\n", irq);
> -        return;
> -    }
> -
>       if (irq_method & PSIHB9_IRQ_METHOD) {
>           qemu_log_mask(LOG_GUEST_ERROR, "PSI: LSI IRQ method no supported\n");
>           return;
diff mbox series

Patch

diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 950ecca40573..98045ed3d249 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -219,11 +219,6 @@  static void pnv_psi_power8_set_irq(void *opaque, int irq, int state)
     uint32_t src;
     bool masked;
 
-    if (irq > PSIHB_IRQ_EXTERNAL) {
-        qemu_log_mask(LOG_GUEST_ERROR, "PSI: Unsupported irq %d\n", irq);
-        return;
-    }
-
     xivr_reg = xivr_regs[irq];
     stat_reg = stat_regs[irq];
 
@@ -813,11 +808,6 @@  static void pnv_psi_power9_set_irq(void *opaque, int irq, int state)
     PnvPsi *psi = opaque;
     uint64_t irq_method = psi->regs[PSIHB_REG(PSIHB9_INTERRUPT_CONTROL)];
 
-    if (irq > PSIHB9_NUM_IRQS) {
-        qemu_log_mask(LOG_GUEST_ERROR, "PSI: Unsupported irq %d\n", irq);
-        return;
-    }
-
     if (irq_method & PSIHB9_IRQ_METHOD) {
         qemu_log_mask(LOG_GUEST_ERROR, "PSI: LSI IRQ method no supported\n");
         return;