[PATCH 02/10] target/loongarch: Declare loongarch_cpu_dump_state() locally

Philippe Mathieu-Daudé posted 10 patches 1 week, 1 day ago
[PATCH 02/10] target/loongarch: Declare loongarch_cpu_dump_state() locally
Posted by Philippe Mathieu-Daudé 1 week, 1 day ago
loongarch_cpu_dump_state() is not used outside of cpu.c,
no need to expose its prototype.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/loongarch/internals.h | 2 --
 target/loongarch/cpu.c       | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h
index 1a02427627..0655ac948b 100644
--- a/target/loongarch/internals.h
+++ b/target/loongarch/internals.h
@@ -18,8 +18,6 @@
 
 void loongarch_translate_init(void);
 
-void loongarch_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
-
 void G_NORETURN do_raise_exception(CPULoongArchState *env,
                                    uint32_t exception,
                                    uintptr_t pc);
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 57cc4f314b..e599beb30a 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -742,7 +742,7 @@ static ObjectClass *loongarch_cpu_class_by_name(const char *cpu_model)
     return oc;
 }
 
-void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
+static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
 {
     CPULoongArchState *env = cpu_env(cs);
     int i;
-- 
2.45.2


Re: [PATCH 02/10] target/loongarch: Declare loongarch_cpu_dump_state() locally
Posted by Richard Henderson 1 week, 1 day ago
On 11/15/24 07:20, Philippe Mathieu-Daudé wrote:
> loongarch_cpu_dump_state() is not used outside of cpu.c,
> no need to expose its prototype.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   target/loongarch/internals.h | 2 --
>   target/loongarch/cpu.c       | 2 +-
>   2 files changed, 1 insertion(+), 3 deletions(-)

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

r~

Re: [PATCH 02/10] target/loongarch: Declare loongarch_cpu_dump_state() locally
Posted by Peter Maydell 1 week, 1 day ago
On Fri, 15 Nov 2024 at 15:21, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> loongarch_cpu_dump_state() is not used outside of cpu.c,
> no need to expose its prototype.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM