mirror of
https://github.com/qemu/qemu.git
synced 2024-12-05 01:33:41 +08:00
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 <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
627fa61746
commit
00ed3da9b5
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user