Skip to contentSkip to conversation

target/sparc: Make sparc_cpu_dump_state() static

PATCH Applied Philippe Mathieu-Daudé 3 participants 4 messages Sep 16, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/sparc: Make sparc_cpu_dump_state() static

The sparc_cpu_dump_state() function is only called within the same file. Make it static.

---
 target/sparc/cpu.h | 1 -
 target/sparc/cpu.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
target/sparc/cpu.h +0 -1
index ff8ae73002a..1f40d768d8b 100644
@@ -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);
target/sparc/cpu.c +1 -1
index 5a8a4ce7506..21dd27796d0 100644
@@ -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;
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw

Le 16/09/2021 à 10:40, Philippe Mathieu-Daudé a écrit :

Quoted 27 lines

The sparc_cpu_dump_state() function is only called within the same file. Make it static.

---
 target/sparc/cpu.h | 1 -
 target/sparc/cpu.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
target/sparc/cpu.h +0 -1
index ff8ae73002a..1f40d768d8b 100644
@@ -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);
target/sparc/cpu.c +0 -0
index 5a8a4ce7506..21dd27796d0 100644

target/sparc/cpu.c static void cpu_print_cc(FILE *f, uint32_t cc) · line 618

Quoted 8 lines
target/sparc/cpu.c +1 -1
@@ -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 on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 26 lines · Philippe Mathieu-Daudé

The sparc_cpu_dump_state() function is only called within the same file. Make it static.

---
  target/sparc/cpu.h | 1 -
  target/sparc/cpu.c | 2 +-
  2 files changed, 1 insertion(+), 2 deletions(-)
target/sparc/cpu.h +0 -1
index ff8ae73002a..1f40d768d8b 100644
@@ -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);
target/sparc/cpu.c +0 -0
index 5a8a4ce7506..21dd27796d0 100644

target/sparc/cpu.c static void cpu_print_cc(FILE *f, uint32_t cc) · line 618

Quoted 8 lines
target/sparc/cpu.c +1 -1
@@ -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;

ATB,

Mark.

#3 lore raw
In reply to Philippe Mathieu-Daudé

Le 16/09/2021 à 10:40, Philippe Mathieu-Daudé a écrit :

Quoted 27 lines

The sparc_cpu_dump_state() function is only called within the same file. Make it static.

---
 target/sparc/cpu.h | 1 -
 target/sparc/cpu.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
target/sparc/cpu.h +0 -1
index ff8ae73002a..1f40d768d8b 100644
@@ -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);
target/sparc/cpu.c +0 -0
index 5a8a4ce7506..21dd27796d0 100644

target/sparc/cpu.c static void cpu_print_cc(FILE *f, uint32_t cc) · line 618

Quoted 8 lines
target/sparc/cpu.c +1 -1
@@ -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