diff mbox series

[for-6.2,5/6] s390x: event-facility: Use SCLP_EVENT_BUS macro

Message ID 20210805193431.307761-6-ehabkost@redhat.com (mailing list archive)
State New, archived
Headers show
Series qom: Fix broken OBJECT_CHECK usage | expand

Commit Message

Eduardo Habkost Aug. 5, 2021, 7:34 p.m. UTC
Use the SCLP_EVENT_BUS macro instead of manually calling
OBJECT_CHECK.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org
---
 hw/s390x/event-facility.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth Aug. 6, 2021, 4:15 a.m. UTC | #1
On 05/08/2021 21.34, Eduardo Habkost wrote:
> Use the SCLP_EVENT_BUS macro instead of manually calling
> OBJECT_CHECK.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Halil Pasic <pasic@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: qemu-s390x@nongnu.org
> Cc: qemu-devel@nongnu.org
> ---
>   hw/s390x/event-facility.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
> index 9f7883d6e20..bc706bd19b4 100644
> --- a/hw/s390x/event-facility.c
> +++ b/hw/s390x/event-facility.c
> @@ -532,7 +532,7 @@ BusState *sclp_get_event_facility_bus(void)
>       SCLPEventsBus *sbus;
>   
>       busobj = object_resolve_path_type("", TYPE_SCLP_EVENTS_BUS, NULL);
> -    sbus = OBJECT_CHECK(SCLPEventsBus, busobj, TYPE_SCLP_EVENTS_BUS);
> +    sbus = SCLP_EVENT_BUS(busobj);
>       if (!sbus) {
>           return NULL;
>       }
> 

I think this could be merged with the previous patch. Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>
David Hildenbrand Aug. 6, 2021, 6:54 a.m. UTC | #2
On 06.08.21 06:15, Thomas Huth wrote:
> On 05/08/2021 21.34, Eduardo Habkost wrote:
>> Use the SCLP_EVENT_BUS macro instead of manually calling
>> OBJECT_CHECK.
>>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> ---
>> Cc: Cornelia Huck <cohuck@redhat.com>
>> Cc: Thomas Huth <thuth@redhat.com>
>> Cc: Halil Pasic <pasic@linux.ibm.com>
>> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
>> Cc: Richard Henderson <richard.henderson@linaro.org>
>> Cc: David Hildenbrand <david@redhat.com>
>> Cc: qemu-s390x@nongnu.org
>> Cc: qemu-devel@nongnu.org
>> ---
>>    hw/s390x/event-facility.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
>> index 9f7883d6e20..bc706bd19b4 100644
>> --- a/hw/s390x/event-facility.c
>> +++ b/hw/s390x/event-facility.c
>> @@ -532,7 +532,7 @@ BusState *sclp_get_event_facility_bus(void)
>>        SCLPEventsBus *sbus;
>>    
>>        busobj = object_resolve_path_type("", TYPE_SCLP_EVENTS_BUS, NULL);
>> -    sbus = OBJECT_CHECK(SCLPEventsBus, busobj, TYPE_SCLP_EVENTS_BUS);
>> +    sbus = SCLP_EVENT_BUS(busobj);
>>        if (!sbus) {
>>            return NULL;
>>        }
>>
> 
> I think this could be merged with the previous patch. Anyway:
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

+1

Reviewed-by: David Hildenbrand <david@redhat.com>
Cornelia Huck Aug. 6, 2021, 11:47 a.m. UTC | #3
On Fri, Aug 06 2021, David Hildenbrand <david@redhat.com> wrote:

> On 06.08.21 06:15, Thomas Huth wrote:
>> On 05/08/2021 21.34, Eduardo Habkost wrote:
>>> Use the SCLP_EVENT_BUS macro instead of manually calling
>>> OBJECT_CHECK.
>>>
>>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>>> ---
>>> Cc: Cornelia Huck <cohuck@redhat.com>
>>> Cc: Thomas Huth <thuth@redhat.com>
>>> Cc: Halil Pasic <pasic@linux.ibm.com>
>>> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
>>> Cc: Richard Henderson <richard.henderson@linaro.org>
>>> Cc: David Hildenbrand <david@redhat.com>
>>> Cc: qemu-s390x@nongnu.org
>>> Cc: qemu-devel@nongnu.org
>>> ---
>>>    hw/s390x/event-facility.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>> I think this could be merged with the previous patch. Anyway:
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> 
>
> +1
>
> Reviewed-by: David Hildenbrand <david@redhat.com>

+1 :)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
diff mbox series

Patch

diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 9f7883d6e20..bc706bd19b4 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -532,7 +532,7 @@  BusState *sclp_get_event_facility_bus(void)
     SCLPEventsBus *sbus;
 
     busobj = object_resolve_path_type("", TYPE_SCLP_EVENTS_BUS, NULL);
-    sbus = OBJECT_CHECK(SCLPEventsBus, busobj, TYPE_SCLP_EVENTS_BUS);
+    sbus = SCLP_EVENT_BUS(busobj);
     if (!sbus) {
         return NULL;
     }