diff mbox

[2/2] Drop cpu_list_id macro

Message ID 1344609318-24983-3-git-send-email-peter.maydell@linaro.org
State Accepted
Commit e916cbf80328d46b288f6c82a12cb3b8fc4fbd4a
Headers show

Commit Message

Peter Maydell Aug. 10, 2012, 2:35 p.m. UTC
Since the only user of the extended cpu_list_id() format
was the x86 ?model/?dump/?cpuid output, we can drop it
completely.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 cpus.c            |    6 ++----
 linux-user/main.c |    6 ++----
 target-i386/cpu.c |    4 ++--
 target-i386/cpu.h |    4 ++--
 4 files changed, 8 insertions(+), 12 deletions(-)

Comments

Eduardo Habkost Aug. 10, 2012, 2:41 p.m. UTC | #1
On Fri, Aug 10, 2012 at 03:35:18PM +0100, Peter Maydell wrote:
> Since the only user of the extended cpu_list_id() format
> was the x86 ?model/?dump/?cpuid output, we can drop it
> completely.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

> ---
>  cpus.c            |    6 ++----
>  linux-user/main.c |    6 ++----
>  target-i386/cpu.c |    4 ++--
>  target-i386/cpu.h |    4 ++--
>  4 files changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 3de2e27..c965b3a 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1191,10 +1191,8 @@ void set_cpu_log_filename(const char *optarg)
>  void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
>  {
>      /* XXX: implement xxx_cpu_list for targets that still miss it */
> -#if defined(cpu_list_id)
> -    cpu_list_id(f, cpu_fprintf, optarg);
> -#elif defined(cpu_list)
> -    cpu_list(f, cpu_fprintf); /* deprecated */
> +#if defined(cpu_list)
> +    cpu_list(f, cpu_fprintf);
>  #endif
>  }
>  
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 53714de..8b50163 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -3143,10 +3143,8 @@ static void handle_arg_cpu(const char *arg)
>      cpu_model = strdup(arg);
>      if (cpu_model == NULL || is_help_option(cpu_model)) {
>          /* XXX: implement xxx_cpu_list for targets that still miss it */
> -#if defined(cpu_list_id)
> -        cpu_list_id(stdout, &fprintf, "");
> -#elif defined(cpu_list)
> -        cpu_list(stdout, &fprintf); /* deprecated */
> +#if defined(cpu_list)
> +        cpu_list(stdout, &fprintf);
>  #endif
>          exit(1);
>      }
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index d3a2b47..a902502 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1059,8 +1059,8 @@ static void listflags(char *buf, int bufsize, uint32_t fbits,
>          }
>  }
>  
> -/* generate CPU information */
> -void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
> +/* generate CPU information. */
> +void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf)
>  {
>      x86_def_t *def;
>      char buf[256];
> diff --git a/target-i386/cpu.h b/target-i386/cpu.h
> index 60f9e97..751f44d 100644
> --- a/target-i386/cpu.h
> +++ b/target-i386/cpu.h
> @@ -791,7 +791,7 @@ typedef struct CPUX86State {
>  
>  X86CPU *cpu_x86_init(const char *cpu_model);
>  int cpu_x86_exec(CPUX86State *s);
> -void x86_cpu_list (FILE *f, fprintf_function cpu_fprintf, const char *optarg);
> +void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf);
>  void x86_cpudef_setup(void);
>  int cpu_x86_support_mca_broadcast(CPUX86State *env);
>  
> @@ -975,7 +975,7 @@ static inline CPUX86State *cpu_init(const char *cpu_model)
>  #define cpu_exec cpu_x86_exec
>  #define cpu_gen_code cpu_x86_gen_code
>  #define cpu_signal_handler cpu_x86_signal_handler
> -#define cpu_list_id x86_cpu_list
> +#define cpu_list x86_cpu_list
>  #define cpudef_setup	x86_cpudef_setup
>  
>  #define CPU_SAVE_VERSION 12
> -- 
> 1.7.9.5
>
diff mbox

Patch

diff --git a/cpus.c b/cpus.c
index 3de2e27..c965b3a 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1191,10 +1191,8 @@  void set_cpu_log_filename(const char *optarg)
 void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
 {
     /* XXX: implement xxx_cpu_list for targets that still miss it */
-#if defined(cpu_list_id)
-    cpu_list_id(f, cpu_fprintf, optarg);
-#elif defined(cpu_list)
-    cpu_list(f, cpu_fprintf); /* deprecated */
+#if defined(cpu_list)
+    cpu_list(f, cpu_fprintf);
 #endif
 }
 
diff --git a/linux-user/main.c b/linux-user/main.c
index 53714de..8b50163 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3143,10 +3143,8 @@  static void handle_arg_cpu(const char *arg)
     cpu_model = strdup(arg);
     if (cpu_model == NULL || is_help_option(cpu_model)) {
         /* XXX: implement xxx_cpu_list for targets that still miss it */
-#if defined(cpu_list_id)
-        cpu_list_id(stdout, &fprintf, "");
-#elif defined(cpu_list)
-        cpu_list(stdout, &fprintf); /* deprecated */
+#if defined(cpu_list)
+        cpu_list(stdout, &fprintf);
 #endif
         exit(1);
     }
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index d3a2b47..a902502 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1059,8 +1059,8 @@  static void listflags(char *buf, int bufsize, uint32_t fbits,
         }
 }
 
-/* generate CPU information */
-void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
+/* generate CPU information. */
+void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf)
 {
     x86_def_t *def;
     char buf[256];
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 60f9e97..751f44d 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -791,7 +791,7 @@  typedef struct CPUX86State {
 
 X86CPU *cpu_x86_init(const char *cpu_model);
 int cpu_x86_exec(CPUX86State *s);
-void x86_cpu_list (FILE *f, fprintf_function cpu_fprintf, const char *optarg);
+void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf);
 void x86_cpudef_setup(void);
 int cpu_x86_support_mca_broadcast(CPUX86State *env);
 
@@ -975,7 +975,7 @@  static inline CPUX86State *cpu_init(const char *cpu_model)
 #define cpu_exec cpu_x86_exec
 #define cpu_gen_code cpu_x86_gen_code
 #define cpu_signal_handler cpu_x86_signal_handler
-#define cpu_list_id x86_cpu_list
+#define cpu_list x86_cpu_list
 #define cpudef_setup	x86_cpudef_setup
 
 #define CPU_SAVE_VERSION 12