[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-6.2 02/12] qom: Use DEVICE_*CLASS instead of OBJECT_*CLAS
From: |
Juan Quintela |
Subject: |
Re: [PATCH for-6.2 02/12] qom: Use DEVICE_*CLASS instead of OBJECT_*CLASS |
Date: |
Tue, 10 Aug 2021 13:56:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Eduardo Habkost <ehabkost@redhat.com> wrote:
> There are multiple functions where OBJECT_GET_CLASS or
> OBJECT_CLASS_CHECK are being used directly for
> DeviceClass/TYPE_DEVICE, instead of the DEVICE_GET_CLASS or
> DEVICE_CLASS wrappers. There's no reason to not use the
> wrappers, so use them.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
> - DeviceClass *dc = OBJECT_CLASS_CHECK(DeviceClass, list->data,
> - TYPE_DEVICE);
> + DeviceClass *dc = DEVICE_CLASS(list->data);
Finding where DEVICE_CLASS is defined is .... interesting.
- [PATCH for-6.2 00/12] qom: Get rid of all manual usage of OBJECT_CHECK & friends, Eduardo Habkost, 2021/08/06
- [PATCH for-6.2 01/12] accel: Rename TYPE_ACCEL to TYPE_ACCEL_BASE, Eduardo Habkost, 2021/08/06
- [PATCH for-6.2 02/12] qom: Use DEVICE_*CLASS instead of OBJECT_*CLASS, Eduardo Habkost, 2021/08/06
- [PATCH for-6.2 03/12] scripts/codeconverter: Update to latest version, Eduardo Habkost, 2021/08/06
- [PATCH for-6.2 04/12] [automated] Add struct names to typedefs used by QOM types, Eduardo Habkost, 2021/08/06
- [PATCH for-6.2 05/12] [automated] Move QOM typedefs and add missing includes, Eduardo Habkost, 2021/08/06
- [PATCH for-6.2 06/12] [automated] Split QOM "typedef struct T { ... } T" declarations, Eduardo Habkost, 2021/08/06