[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-s390x
Subject:    [qemu-s390x] [PATCH v3 03/18] s390x/tcg: simplify lookup of flic
From:       David Hildenbrand <david () redhat ! com>
Date:       2018-01-29 12:56:08
Message-ID: 20180129125623.21729-4-david () redhat ! com
[Download RAW message or body]

We can simply search for an object of our common type.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/intc/s390_flic.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index fc244fe775..ba1aa40eba 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -27,11 +27,9 @@ S390FLICState *s390_get_flic(void)
     static S390FLICState *fs;
 
     if (!fs) {
-        fs = S390_FLIC_COMMON(object_resolve_path(TYPE_KVM_S390_FLIC, NULL));
-        if (!fs) {
-            fs = S390_FLIC_COMMON(object_resolve_path(TYPE_QEMU_S390_FLIC,
-                                                      NULL));
-        }
+        fs = S390_FLIC_COMMON(object_resolve_path_type("",
+                                                       TYPE_S390_FLIC_COMMON,
+                                                       NULL));
     }
     return fs;
 }
-- 
2.14.3



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic