From: David Gibson Date: Tue, 24 Sep 2019 06:00:33 +0000 (+1000) Subject: xics: Minor fixes for XICSFabric interface X-Git-Tag: v4.2.0-rc0~70^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00ed3da9b5c2e66e796a172df3e19545462b9c90;p=thirdparty%2Fqemu.git xics: Minor fixes for XICSFabric interface 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 Reviewed-by: Greg Kurz Reviewed-by: Cédric Le Goater --- diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 64a2c8862a7..faa33ae943a 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -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) \