* Re: [PATCH] target/sparc: Make sparc_cpu_dump_state() static
2021-09-16 8:40 [PATCH] target/sparc: Make sparc_cpu_dump_state() static Philippe Mathieu-Daudé
@ 2021-09-16 9:43 ` Laurent Vivier
2021-09-16 10:51 ` Mark Cave-Ayland
2021-09-16 12:52 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2021-09-16 9:43 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-trivial, Mark Cave-Ayland, Artyom Tarasenko
Le 16/09/2021 à 10:40, Philippe Mathieu-Daudé a écrit :
> The sparc_cpu_dump_state() function is only called within
> the same file. Make it static.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/sparc/cpu.h | 1 -
> target/sparc/cpu.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
> index ff8ae73002a..1f40d768d8b 100644
> --- a/target/sparc/cpu.h
> +++ b/target/sparc/cpu.h
> @@ -571,7 +571,6 @@ extern const VMStateDescription vmstate_sparc_cpu;
> #endif
>
> void sparc_cpu_do_interrupt(CPUState *cpu);
> -void sparc_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
> hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
> int sparc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
> int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
> diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
> index 5a8a4ce7506..21dd27796d0 100644
> --- a/target/sparc/cpu.c
> +++ b/target/sparc/cpu.c
> @@ -612,7 +612,7 @@ static void cpu_print_cc(FILE *f, uint32_t cc)
> #define REGS_PER_LINE 8
> #endif
>
> -void sparc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> +static void sparc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> {
> SPARCCPU *cpu = SPARC_CPU(cs);
> CPUSPARCState *env = &cpu->env;
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/sparc: Make sparc_cpu_dump_state() static
2021-09-16 8:40 [PATCH] target/sparc: Make sparc_cpu_dump_state() static Philippe Mathieu-Daudé
2021-09-16 9:43 ` Laurent Vivier
@ 2021-09-16 10:51 ` Mark Cave-Ayland
2021-09-16 12:52 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Mark Cave-Ayland @ 2021-09-16 10:51 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial, Artyom Tarasenko
On 16/09/2021 09:40, Philippe Mathieu-Daudé wrote:
> The sparc_cpu_dump_state() function is only called within
> the same file. Make it static.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/sparc/cpu.h | 1 -
> target/sparc/cpu.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
> index ff8ae73002a..1f40d768d8b 100644
> --- a/target/sparc/cpu.h
> +++ b/target/sparc/cpu.h
> @@ -571,7 +571,6 @@ extern const VMStateDescription vmstate_sparc_cpu;
> #endif
>
> void sparc_cpu_do_interrupt(CPUState *cpu);
> -void sparc_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
> hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
> int sparc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
> int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
> diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
> index 5a8a4ce7506..21dd27796d0 100644
> --- a/target/sparc/cpu.c
> +++ b/target/sparc/cpu.c
> @@ -612,7 +612,7 @@ static void cpu_print_cc(FILE *f, uint32_t cc)
> #define REGS_PER_LINE 8
> #endif
>
> -void sparc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> +static void sparc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> {
> SPARCCPU *cpu = SPARC_CPU(cs);
> CPUSPARCState *env = &cpu->env;
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/sparc: Make sparc_cpu_dump_state() static
2021-09-16 8:40 [PATCH] target/sparc: Make sparc_cpu_dump_state() static Philippe Mathieu-Daudé
2021-09-16 9:43 ` Laurent Vivier
2021-09-16 10:51 ` Mark Cave-Ayland
@ 2021-09-16 12:52 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2021-09-16 12:52 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-trivial, Mark Cave-Ayland, Artyom Tarasenko
Le 16/09/2021 à 10:40, Philippe Mathieu-Daudé a écrit :
> The sparc_cpu_dump_state() function is only called within
> the same file. Make it static.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/sparc/cpu.h | 1 -
> target/sparc/cpu.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
> index ff8ae73002a..1f40d768d8b 100644
> --- a/target/sparc/cpu.h
> +++ b/target/sparc/cpu.h
> @@ -571,7 +571,6 @@ extern const VMStateDescription vmstate_sparc_cpu;
> #endif
>
> void sparc_cpu_do_interrupt(CPUState *cpu);
> -void sparc_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
> hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
> int sparc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
> int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
> diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
> index 5a8a4ce7506..21dd27796d0 100644
> --- a/target/sparc/cpu.c
> +++ b/target/sparc/cpu.c
> @@ -612,7 +612,7 @@ static void cpu_print_cc(FILE *f, uint32_t cc)
> #define REGS_PER_LINE 8
> #endif
>
> -void sparc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> +static void sparc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> {
> SPARCCPU *cpu = SPARC_CPU(cs);
> CPUSPARCState *env = &cpu->env;
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread