From 100f738850639a108d6767316ce4dcc1d1ea4ae4 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Thu, 8 Jun 2017 15:42:50 +0200 Subject: xics: pass appropriate types to realize() handlers. It makes more sense to pass an IPCState * to handlers of ICPStateClass instead of a DeviceState *, if only to benefit from compile time type checking. The same goes with ICSStateClass. While here, we also change the declaration of ICPStateClass in xics.h for consistency. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- include/hw/ppc/xics.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/hw') diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 31145326eb..797df82fef 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -65,9 +65,9 @@ typedef struct XICSFabric XICSFabric; struct ICPStateClass { DeviceClass parent_class; - void (*realize)(DeviceState *dev, Error **errp); - void (*pre_save)(ICPState *s); - int (*post_load)(ICPState *s, int version_id); + void (*realize)(ICPState *icp, Error **errp); + void (*pre_save)(ICPState *icp); + int (*post_load)(ICPState *icp, int version_id); void (*cpu_setup)(ICPState *icp, PowerPCCPU *cpu); void (*reset)(ICPState *icp); }; @@ -113,7 +113,7 @@ struct PnvICPState { struct ICSStateClass { DeviceClass parent_class; - void (*realize)(DeviceState *dev, Error **errp); + void (*realize)(ICSState *s, Error **errp); void (*pre_save)(ICSState *s); int (*post_load)(ICSState *s, int version_id); void (*reject)(ICSState *s, uint32_t irq); -- cgit v1.2.3