@@ -32,13 +32,10 @@
#define U2FHID_PACKET_SIZE 64
#define U2FHID_PENDING_IN_NUM 32
-typedef struct U2FKeyState U2FKeyState;
typedef struct U2FKeyInfo U2FKeyInfo;
#define TYPE_U2F_KEY "u2f-key"
-typedef struct U2FKeyClass U2FKeyClass;
-DECLARE_OBJ_CHECKERS(U2FKeyState, U2FKeyClass,
- U2F_KEY, TYPE_U2F_KEY)
+OBJECT_DECLARE_TYPE(U2FKeyState, U2FKeyClass, U2F_KEY)
/*
* Callbacks to be used by the U2F key base device (i.e. hw/u2f.c)
@@ -69,7 +66,6 @@ struct U2FKeyState {
uint8_t pending_in_end;
uint8_t pending_in_num;
};
-typedef struct U2FKeyState U2FKeyState;
/*
* API to be used by the U2F key device variants (i.e. hw/u2f-*.c)
@@ -25,10 +25,7 @@
#include "qom/object.h"
#define TYPE_QCRYPTO_TLS_CREDS "tls-creds"
-typedef struct QCryptoTLSCreds QCryptoTLSCreds;
-typedef struct QCryptoTLSCredsClass QCryptoTLSCredsClass;
-DECLARE_OBJ_CHECKERS(QCryptoTLSCreds, QCryptoTLSCredsClass, QCRYPTO_TLS_CREDS,
- TYPE_QCRYPTO_TLS_CREDS)
+OBJECT_DECLARE_TYPE(QCryptoTLSCreds, QCryptoTLSCredsClass, QCRYPTO_TLS_CREDS)
#define QCRYPTO_TLS_CREDS_DH_PARAMS "dh-params.pem"
@@ -20,10 +20,7 @@
#include "qapi/error.h"
#define TYPE_SPAPR_DR_CONNECTOR "spapr-dr-connector"
-typedef struct SpaprDrc SpaprDrc;
-typedef struct SpaprDrcClass SpaprDrcClass;
-DECLARE_OBJ_CHECKERS(SpaprDrc, SpaprDrcClass,
- SPAPR_DR_CONNECTOR, TYPE_SPAPR_DR_CONNECTOR)
+OBJECT_DECLARE_TYPE(SpaprDrc, SpaprDrcClass, SPAPR_DR_CONNECTOR)
#define TYPE_SPAPR_DRC_PHYSICAL "spapr-drc-physical"
typedef struct SpaprDrcPhysical SpaprDrcPhysical;
@@ -15,10 +15,7 @@
#include "qom/object.h"
#define TYPE_SPAPR_XIVE "spapr-xive"
-typedef struct SpaprXive SpaprXive;
-typedef struct SpaprXiveClass SpaprXiveClass;
-DECLARE_OBJ_CHECKERS(SpaprXive, SpaprXiveClass,
- SPAPR_XIVE, TYPE_SPAPR_XIVE)
+OBJECT_DECLARE_TYPE(SpaprXive, SpaprXiveClass, SPAPR_XIVE)
struct SpaprXive {
XiveRouter parent;
@@ -54,15 +54,13 @@ struct AccelClass {
*/
GPtrArray *compat_props;
};
-typedef struct AccelClass AccelClass;
#define TYPE_ACCEL_BASE "accel"
#define ACCEL_CLASS_SUFFIX "-" TYPE_ACCEL_BASE
#define ACCEL_CLASS_NAME(a) (a ACCEL_CLASS_SUFFIX)
-DECLARE_OBJ_CHECKERS(AccelState, AccelClass,
- ACCEL_BASE, TYPE_ACCEL_BASE)
+OBJECT_DECLARE_TYPE(AccelState, AccelClass, ACCEL_BASE)
AccelClass *accel_find(const char *opt_name);
AccelState *current_accel(void);
@@ -33,10 +33,7 @@
#include "trace.h"
#define TYPE_SYSBUS_FDC "base-sysbus-fdc"
-typedef struct FDCtrlSysBusClass FDCtrlSysBusClass;
-typedef struct FDCtrlSysBus FDCtrlSysBus;
-DECLARE_OBJ_CHECKERS(FDCtrlSysBus, FDCtrlSysBusClass,
- SYSBUS_FDC, TYPE_SYSBUS_FDC)
+OBJECT_DECLARE_TYPE(FDCtrlSysBus, FDCtrlSysBusClass, SYSBUS_FDC)
struct FDCtrlSysBusClass {
/*< private >*/
Replace typedefs + DECLARE_OBJ_CHECKERS with equivalent OBJECT_DECLARE_TYPE macro. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Cc: John Snow <jsnow@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Max Reitz <mreitz@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Greg Kurz <groug@kaod.org> Cc: "Cédric Le Goater" <clg@kaod.org> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org --- hw/usb/u2f.h | 6 +----- include/crypto/tlscreds.h | 5 +---- include/hw/ppc/spapr_drc.h | 5 +---- include/hw/ppc/spapr_xive.h | 5 +---- include/qemu/accel.h | 4 +--- hw/block/fdc-sysbus.c | 5 +---- 6 files changed, 6 insertions(+), 24 deletions(-)