]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
xics: Minor fixes for XICSFabric interface
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 24 Sep 2019 06:00:33 +0000 (16:00 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Oct 2019 09:08:21 +0000 (19:08 +1000)
Interface instances should never be directly dereferenced.  So, the common
practice is to make them incomplete types to make sure no-one does that.
XICSFrabric, however, had a dummy type which is less safe.

We were also using OBJECT_CHECK() where we should have been using
INTERFACE_CHECK().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
include/hw/ppc/xics.h

index 64a2c8862a729940fc2600a977ea83499c21b498..faa33ae943ad80c1d8efaea7052d8863ea51e1f1 100644 (file)
@@ -147,13 +147,9 @@ struct ICSIRQState {
     uint8_t flags;
 };
 
-struct XICSFabric {
-    Object parent;
-};
-
 #define TYPE_XICS_FABRIC "xics-fabric"
 #define XICS_FABRIC(obj)                                     \
-    OBJECT_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC)
+    INTERFACE_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC)
 #define XICS_FABRIC_CLASS(klass)                                     \
     OBJECT_CLASS_CHECK(XICSFabricClass, (klass), TYPE_XICS_FABRIC)
 #define XICS_FABRIC_GET_CLASS(obj)                                   \