[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 7/9] armv7m: Remove unused armv7m_nvic_acknowledge
From: |
Alex Bennée |
Subject: |
Re: [Qemu-arm] [PATCH 7/9] armv7m: Remove unused armv7m_nvic_acknowledge_irq() return value |
Date: |
Wed, 15 Feb 2017 14:16:45 +0000 |
User-agent: |
mu4e 0.9.19; emacs 25.2.3 |
Peter Maydell <address@hidden> writes:
> Having armv7m_nvic_acknowledge_irq() return the new value of
> env->v7m.exception and its one caller assign the return value
> back to env->v7m.exception is pointless. Just make the return
> type void instead.
>
> Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
> ---
> target/arm/cpu.h | 2 +-
> hw/intc/armv7m_nvic.c | 4 +---
> target/arm/helper.c | 2 +-
> 3 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index ac20a56..36cccfc 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -1344,7 +1344,7 @@ static inline bool
> armv7m_nvic_can_take_pending_exception(void *opaque)
> }
> #endif
> void armv7m_nvic_set_pending(void *opaque, int irq);
> -int armv7m_nvic_acknowledge_irq(void *opaque);
> +void armv7m_nvic_acknowledge_irq(void *opaque);
> void armv7m_nvic_complete_irq(void *opaque, int irq);
>
> /* Interface for defining coprocessor registers.
> diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
> index 2eaac3d..7b61fe6 100644
> --- a/hw/intc/armv7m_nvic.c
> +++ b/hw/intc/armv7m_nvic.c
> @@ -394,7 +394,7 @@ void armv7m_nvic_set_pending(void *opaque, int irq)
> }
>
> /* Make pending IRQ active. */
> -int armv7m_nvic_acknowledge_irq(void *opaque)
> +void armv7m_nvic_acknowledge_irq(void *opaque)
> {
> NVICState *s = (NVICState *)opaque;
> CPUARMState *env = &s->cpu->env;
> @@ -421,8 +421,6 @@ int armv7m_nvic_acknowledge_irq(void *opaque)
> env->v7m.exception = s->vectpending;
>
> nvic_irq_update(s);
> -
> - return env->v7m.exception;
> }
>
> void armv7m_nvic_complete_irq(void *opaque, int irq)
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 6c86eac..78bf9ab 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -6103,7 +6103,7 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs)
> armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_DEBUG);
> return;
> case EXCP_IRQ:
> - env->v7m.exception = armv7m_nvic_acknowledge_irq(env->nvic);
> + armv7m_nvic_acknowledge_irq(env->nvic);
> break;
> case EXCP_EXCEPTION_EXIT:
> do_v7m_exception_exit(env);
--
Alex Bennée
- [Qemu-arm] [PATCH 0/9] Rewrite NVIC to not depend on the GIC, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 9/9] armv7m: VECTCLRACTIVE and VECTRESET are UNPREDICTABLE, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 8/9] armv7m: Simpler and faster exception start, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 7/9] armv7m: Remove unused armv7m_nvic_acknowledge_irq() return value, Peter Maydell, 2017/02/02
- Re: [Qemu-arm] [PATCH 7/9] armv7m: Remove unused armv7m_nvic_acknowledge_irq() return value,
Alex Bennée <=
- [Qemu-arm] [PATCH 6/9] armv7m: Escalate exceptions to HardFault if necessary, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 4/9] armv7m: Fix condition check for taking exceptions, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 2/9] armv7m: Implement reading and writing of PRIGROUP, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 5/9] arm: gic: Remove references to NVIC, Peter Maydell, 2017/02/02
- [Qemu-arm] [PATCH 1/9] armv7m: Rename nvic_state to NVICState, Peter Maydell, 2017/02/02