diff mbox series

[21/41] s390_flic: Move KVMS390FLICState typedef to header

Message ID 20200813222625.243136-22-ehabkost@redhat.com
State New
Headers show
Series qom: Automated conversion of type checking boilerplate | expand

Commit Message

Eduardo Habkost Aug. 13, 2020, 10:26 p.m. UTC
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/hw/s390x/s390_flic.h | 1 +
 hw/intc/s390_flic_kvm.c      | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Cornelia Huck Aug. 17, 2020, 7:26 a.m. UTC | #1
On Thu, 13 Aug 2020 18:26:05 -0400
Eduardo Habkost <ehabkost@redhat.com> wrote:

> Move typedef closer to the type check macros, to make it easier
> to convert the code to OBJECT_DEFINE_TYPE() in the future.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  include/hw/s390x/s390_flic.h | 1 +
>  hw/intc/s390_flic_kvm.c      | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>
Daniel P. Berrangé Aug. 17, 2020, 4:02 p.m. UTC | #2
On Thu, Aug 13, 2020 at 06:26:05PM -0400, Eduardo Habkost wrote:
> Move typedef closer to the type check macros, to make it easier
> to convert the code to OBJECT_DEFINE_TYPE() in the future.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  include/hw/s390x/s390_flic.h | 1 +
>  hw/intc/s390_flic_kvm.c      | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
diff mbox series

Patch

diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h
index 4687ecfe83..df11de9b20 100644
--- a/include/hw/s390x/s390_flic.h
+++ b/include/hw/s390x/s390_flic.h
@@ -75,6 +75,7 @@  typedef struct S390FLICStateClass {
 } S390FLICStateClass;
 
 #define TYPE_KVM_S390_FLIC "s390-flic-kvm"
+typedef struct KVMS390FLICState KVMS390FLICState;
 #define KVM_S390_FLIC(obj) \
     OBJECT_CHECK(KVMS390FLICState, (obj), TYPE_KVM_S390_FLIC)
 
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index a306b26faa..dbd4e682ce 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -29,12 +29,12 @@ 
 #define FLIC_FAILED (-1UL)
 #define FLIC_SAVEVM_VERSION 1
 
-typedef struct KVMS390FLICState {
+struct KVMS390FLICState{
     S390FLICState parent_obj;
 
     uint32_t fd;
     bool clear_io_supported;
-} KVMS390FLICState;
+};
 
 static KVMS390FLICState *s390_get_kvm_flic(S390FLICState *fs)
 {