[Qemu-devel] [PATCH v2] hppa: Delete unused hppa_cpu_list() function

Eduardo Habkost posted 1 patch 4 years, 11 months ago
Test asan passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190517191332.23400-1-ehabkost@redhat.com
Maintainers: Richard Henderson <rth@twiddle.net>
target/hppa/cpu.h |  2 --
target/hppa/cpu.c | 17 -----------------
2 files changed, 19 deletions(-)
[Qemu-devel] [PATCH v2] hppa: Delete unused hppa_cpu_list() function
Posted by Eduardo Habkost 4 years, 11 months ago
hppa_cpu_list() is dead code and is never called.  Delete it.

Cc: Richard Henderson <rth@twiddle.net>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* Delete prototype at target/hppa/cpu.h as well
  (Philippe Mathieu-Daudé)
---
 target/hppa/cpu.h |  2 --
 target/hppa/cpu.c | 17 -----------------
 2 files changed, 19 deletions(-)

diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index c1e0215e66..8166d8dcd6 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -272,8 +272,6 @@ void hppa_translate_init(void);
 
 #define CPU_RESOLVING_TYPE TYPE_HPPA_CPU
 
-void hppa_cpu_list(void);
-
 static inline target_ulong hppa_form_gva_psw(target_ureg psw, uint64_t spc,
                                              target_ureg off)
 {
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 9717ea1798..88c699eb35 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -111,23 +111,6 @@ static void hppa_cpu_realizefn(DeviceState *dev, Error **errp)
 #endif
 }
 
-static void hppa_cpu_list_entry(gpointer data, gpointer user_data)
-{
-    ObjectClass *oc = data;
-
-    qemu_printf("  %s\n", object_class_get_name(oc));
-}
-
-void hppa_cpu_list(void)
-{
-    GSList *list;
-
-    list = object_class_get_list_sorted(TYPE_HPPA_CPU, false);
-    qemu_printf("Available CPUs:\n");
-    g_slist_foreach(list, hppa_cpu_list_entry, NULL);
-    g_slist_free(list);
-}
-
 static void hppa_cpu_initfn(Object *obj)
 {
     CPUState *cs = CPU(obj);
-- 
2.18.0.rc1.1.g3f1ff2140


Re: [Qemu-devel] [PATCH v2] hppa: Delete unused hppa_cpu_list() function
Posted by Richard Henderson 4 years, 11 months ago
On 5/17/19 12:13 PM, Eduardo Habkost wrote:
> hppa_cpu_list() is dead code and is never called.  Delete it.
> 
> Cc: Richard Henderson <rth@twiddle.net>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * Delete prototype at target/hppa/cpu.h as well
>   (Philippe Mathieu-Daudé)
> ---
>  target/hppa/cpu.h |  2 --
>  target/hppa/cpu.c | 17 -----------------
>  2 files changed, 19 deletions(-)

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


r~