diff mbox series

target/xtensa: drop function xtensa_timer_irq

Message ID 20190127014440.21789-1-jcmvbkbc@gmail.com (mailing list archive)
State New, archived
Headers show
Series target/xtensa: drop function xtensa_timer_irq | expand

Commit Message

Max Filippov Jan. 27, 2019, 1:44 a.m. UTC
It's a one-liner used in a single place, move its implementation there
and remove its declaration.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 hw/xtensa/pic_cpu.c | 7 +------
 target/xtensa/cpu.h | 1 -
 2 files changed, 1 insertion(+), 7 deletions(-)

Comments

Richard Henderson Jan. 27, 2019, 6:50 p.m. UTC | #1
On 1/26/19 5:44 PM, Max Filippov wrote:
> It's a one-liner used in a single place, move its implementation there
> and remove its declaration.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  hw/xtensa/pic_cpu.c | 7 +------
>  target/xtensa/cpu.h | 1 -
>  2 files changed, 1 insertion(+), 7 deletions(-)

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


r~
Philippe Mathieu-Daudé Jan. 28, 2019, 11:16 a.m. UTC | #2
On 1/27/19 2:44 AM, Max Filippov wrote:
> It's a one-liner used in a single place, move its implementation there
> and remove its declaration.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/xtensa/pic_cpu.c | 7 +------
>  target/xtensa/cpu.h | 1 -
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c
> index 7e4c65e5ec30..f70684902628 100644
> --- a/hw/xtensa/pic_cpu.c
> +++ b/hw/xtensa/pic_cpu.c
> @@ -77,18 +77,13 @@ static void xtensa_set_irq(void *opaque, int irq, int active)
>      }
>  }
>  
> -void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active)
> -{
> -    qemu_set_irq(env->irq_inputs[env->config->timerint[id]], active);
> -}
> -
>  static void xtensa_ccompare_cb(void *opaque)
>  {
>      XtensaCcompareTimer *ccompare = opaque;
>      CPUXtensaState *env = ccompare->env;
>      unsigned i = ccompare - env->ccompare;
>  
> -    xtensa_timer_irq(env, i, 1);
> +    qemu_set_irq(env->irq_inputs[env->config->timerint[i]], 1);
>  }
>  
>  void xtensa_irq_init(CPUXtensaState *env)
> diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
> index bf6f9a09b62c..f579294822c3 100644
> --- a/target/xtensa/cpu.h
> +++ b/target/xtensa/cpu.h
> @@ -570,7 +570,6 @@ void xtensa_sim_open_console(Chardev *chr);
>  void check_interrupts(CPUXtensaState *s);
>  void xtensa_irq_init(CPUXtensaState *env);
>  void *xtensa_get_extint(CPUXtensaState *env, unsigned extint);
> -void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active);
>  int cpu_xtensa_signal_handler(int host_signum, void *pinfo, void *puc);
>  void xtensa_cpu_list(FILE *f, fprintf_function cpu_fprintf);
>  void xtensa_sync_window_from_phys(CPUXtensaState *env);
>
diff mbox series

Patch

diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c
index 7e4c65e5ec30..f70684902628 100644
--- a/hw/xtensa/pic_cpu.c
+++ b/hw/xtensa/pic_cpu.c
@@ -77,18 +77,13 @@  static void xtensa_set_irq(void *opaque, int irq, int active)
     }
 }
 
-void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active)
-{
-    qemu_set_irq(env->irq_inputs[env->config->timerint[id]], active);
-}
-
 static void xtensa_ccompare_cb(void *opaque)
 {
     XtensaCcompareTimer *ccompare = opaque;
     CPUXtensaState *env = ccompare->env;
     unsigned i = ccompare - env->ccompare;
 
-    xtensa_timer_irq(env, i, 1);
+    qemu_set_irq(env->irq_inputs[env->config->timerint[i]], 1);
 }
 
 void xtensa_irq_init(CPUXtensaState *env)
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index bf6f9a09b62c..f579294822c3 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -570,7 +570,6 @@  void xtensa_sim_open_console(Chardev *chr);
 void check_interrupts(CPUXtensaState *s);
 void xtensa_irq_init(CPUXtensaState *env);
 void *xtensa_get_extint(CPUXtensaState *env, unsigned extint);
-void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active);
 int cpu_xtensa_signal_handler(int host_signum, void *pinfo, void *puc);
 void xtensa_cpu_list(FILE *f, fprintf_function cpu_fprintf);
 void xtensa_sync_window_from_phys(CPUXtensaState *env);