[PATCH 05/63] ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE

Eduardo Habkost posted 63 patches 5 years, 5 months ago
[PATCH 05/63] ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE
Posted by Eduardo Habkost 5 years, 5 months ago
This will make the type name constant consistent with the name of
the type checking macro.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Tony Krowiak <akrowiak@linux.ibm.com>
Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: Pierre Morel <pmorel@linux.ibm.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org
---
 include/hw/s390x/ap-device.h | 4 ++--
 hw/s390x/ap-device.c         | 2 +-
 hw/vfio/ap.c                 | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/hw/s390x/ap-device.h b/include/hw/s390x/ap-device.h
index fb250a20f3..e502745de5 100644
--- a/include/hw/s390x/ap-device.h
+++ b/include/hw/s390x/ap-device.h
@@ -14,7 +14,7 @@
 #include "hw/qdev-core.h"
 #include "qom/object.h"
 
-#define AP_DEVICE_TYPE       "ap-device"
+#define TYPE_AP_DEVICE       "ap-device"
 
 struct APDevice {
     DeviceState parent_obj;
@@ -22,6 +22,6 @@ struct APDevice {
 typedef struct APDevice APDevice;
 
 DECLARE_INSTANCE_CHECKER(APDevice, AP_DEVICE,
-                         AP_DEVICE_TYPE)
+                         TYPE_AP_DEVICE)
 
 #endif /* HW_S390X_AP_DEVICE_H */
diff --git a/hw/s390x/ap-device.c b/hw/s390x/ap-device.c
index fc0b41e937..237d1f19c5 100644
--- a/hw/s390x/ap-device.c
+++ b/hw/s390x/ap-device.c
@@ -21,7 +21,7 @@ static void ap_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo ap_device_info = {
-    .name = AP_DEVICE_TYPE,
+    .name = TYPE_AP_DEVICE,
     .parent = TYPE_DEVICE,
     .instance_size = sizeof(APDevice),
     .class_size = sizeof(DeviceClass),
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index f399ec0a31..68ed059b39 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -177,7 +177,7 @@ static void vfio_ap_class_init(ObjectClass *klass, void *data)
 
 static const TypeInfo vfio_ap_info = {
     .name = VFIO_AP_DEVICE_TYPE,
-    .parent = AP_DEVICE_TYPE,
+    .parent = TYPE_AP_DEVICE,
     .instance_size = sizeof(VFIOAPDevice),
     .class_init = vfio_ap_class_init,
 };
-- 
2.26.2


Re: [PATCH 05/63] ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE
Posted by Thomas Huth 5 years, 5 months ago
On 03/09/2020 00.42, Eduardo Habkost wrote:
> This will make the type name constant consistent with the name of
> the type checking macro.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Tony Krowiak <akrowiak@linux.ibm.com>
> Cc: Halil Pasic <pasic@linux.ibm.com>
> Cc: Pierre Morel <pmorel@linux.ibm.com>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: qemu-s390x@nongnu.org
> Cc: qemu-devel@nongnu.org
> ---
>  include/hw/s390x/ap-device.h | 4 ++--
>  hw/s390x/ap-device.c         | 2 +-
>  hw/vfio/ap.c                 | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/hw/s390x/ap-device.h b/include/hw/s390x/ap-device.h
> index fb250a20f3..e502745de5 100644
> --- a/include/hw/s390x/ap-device.h
> +++ b/include/hw/s390x/ap-device.h
> @@ -14,7 +14,7 @@
>  #include "hw/qdev-core.h"
>  #include "qom/object.h"
>  
> -#define AP_DEVICE_TYPE       "ap-device"
> +#define TYPE_AP_DEVICE       "ap-device"
>  
>  struct APDevice {
>      DeviceState parent_obj;
> @@ -22,6 +22,6 @@ struct APDevice {
>  typedef struct APDevice APDevice;
>  
>  DECLARE_INSTANCE_CHECKER(APDevice, AP_DEVICE,
> -                         AP_DEVICE_TYPE)
> +                         TYPE_AP_DEVICE)
>  
>  #endif /* HW_S390X_AP_DEVICE_H */
> diff --git a/hw/s390x/ap-device.c b/hw/s390x/ap-device.c
> index fc0b41e937..237d1f19c5 100644
> --- a/hw/s390x/ap-device.c
> +++ b/hw/s390x/ap-device.c
> @@ -21,7 +21,7 @@ static void ap_class_init(ObjectClass *klass, void *data)
>  }
>  
>  static const TypeInfo ap_device_info = {
> -    .name = AP_DEVICE_TYPE,
> +    .name = TYPE_AP_DEVICE,
>      .parent = TYPE_DEVICE,
>      .instance_size = sizeof(APDevice),
>      .class_size = sizeof(DeviceClass),
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index f399ec0a31..68ed059b39 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -177,7 +177,7 @@ static void vfio_ap_class_init(ObjectClass *klass, void *data)
>  
>  static const TypeInfo vfio_ap_info = {
>      .name = VFIO_AP_DEVICE_TYPE,
> -    .parent = AP_DEVICE_TYPE,
> +    .parent = TYPE_AP_DEVICE,
>      .instance_size = sizeof(VFIOAPDevice),
>      .class_init = vfio_ap_class_init,
>  };
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH 05/63] ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE
Posted by Cornelia Huck 5 years, 5 months ago
On Wed,  2 Sep 2020 18:42:13 -0400
Eduardo Habkost <ehabkost@redhat.com> wrote:

> This will make the type name constant consistent with the name of
> the type checking macro.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Tony Krowiak <akrowiak@linux.ibm.com>
> Cc: Halil Pasic <pasic@linux.ibm.com>
> Cc: Pierre Morel <pmorel@linux.ibm.com>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: qemu-s390x@nongnu.org
> Cc: qemu-devel@nongnu.org
> ---
>  include/hw/s390x/ap-device.h | 4 ++--
>  hw/s390x/ap-device.c         | 2 +-
>  hw/vfio/ap.c                 | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Cornelia Huck <cohuck@redhat.com>