[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/53] throttle-groups: Move ThrottleGroup typedef to header
From: |
Eduardo Habkost |
Subject: |
[PULL 15/53] throttle-groups: Move ThrottleGroup typedef to header |
Date: |
Thu, 27 Aug 2020 15:20:44 -0400 |
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-17-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
include/block/throttle-groups.h | 1 +
block/throttle-groups.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/block/throttle-groups.h b/include/block/throttle-groups.h
index 712a8e64b4..5e77db700f 100644
--- a/include/block/throttle-groups.h
+++ b/include/block/throttle-groups.h
@@ -59,6 +59,7 @@ typedef struct ThrottleGroupMember {
} ThrottleGroupMember;
#define TYPE_THROTTLE_GROUP "throttle-group"
+typedef struct ThrottleGroup ThrottleGroup;
#define THROTTLE_GROUP(obj) OBJECT_CHECK(ThrottleGroup, (obj),
TYPE_THROTTLE_GROUP)
const char *throttle_group_get_name(ThrottleGroupMember *tgm);
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index 98fea7fd47..4e28365d8d 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -63,7 +63,7 @@ static void timer_cb(ThrottleGroupMember *tgm, bool is_write);
* access some other ThrottleGroupMember's timers only after verifying that
* that ThrottleGroupMember has throttled requests in the queue.
*/
-typedef struct ThrottleGroup {
+struct ThrottleGroup {
Object parent_obj;
/* refuse individual property change if initialization is complete */
@@ -79,7 +79,7 @@ typedef struct ThrottleGroup {
/* This field is protected by the global QEMU mutex */
QTAILQ_ENTRY(ThrottleGroup) list;
-} ThrottleGroup;
+};
/* This is protected by the global QEMU mutex */
static QTAILQ_HEAD(, ThrottleGroup) throttle_groups =
--
2.26.2
- [PULL 04/53] vmw_pvscsi: Rename QOM class cast macros, (continued)
- [PULL 04/53] vmw_pvscsi: Rename QOM class cast macros, Eduardo Habkost, 2020/08/27
- [PULL 05/53] pl110: Rename pl110_version enum values, Eduardo Habkost, 2020/08/27
- [PULL 06/53] allwinner-h3: Rename memmap enum constants, Eduardo Habkost, 2020/08/27
- [PULL 09/53] aspeed_timer: Fix ASPEED_TIMER macro definition, Eduardo Habkost, 2020/08/27
- [PULL 08/53] opentitan: Rename memmap enum constants, Eduardo Habkost, 2020/08/27
- [PULL 10/53] versatile: Fix typo in PCI_VPB_HOST definition, Eduardo Habkost, 2020/08/27
- [PULL 07/53] aspeed_soc: Rename memmap/irqmap enum constants, Eduardo Habkost, 2020/08/27
- [PULL 11/53] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS, Eduardo Habkost, 2020/08/27
- [PULL 12/53] hvf: Add missing include, Eduardo Habkost, 2020/08/27
- [PULL 14/53] tulip: Move TulipState typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 15/53] throttle-groups: Move ThrottleGroup typedef to header,
Eduardo Habkost <=
- [PULL 17/53] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h, Eduardo Habkost, 2020/08/27
- [PULL 19/53] mcf_fec: Move mcf_fec_state typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 13/53] hcd-dwc2: Rename USB_*CLASS macros for consistency, Eduardo Habkost, 2020/08/27
- [PULL 16/53] pci: Move PCIBusClass typedef to pci.h, Eduardo Habkost, 2020/08/27
- [PULL 18/53] hvf: Move HVFState typedef to hvf.h, Eduardo Habkost, 2020/08/27
- [PULL 20/53] s390_flic: Move KVMS390FLICState typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 22/53] nubus: Delete unused NUBUS_BRIDGE macro, Eduardo Habkost, 2020/08/27
- [PULL 21/53] can_emu: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/27
- [PULL 23/53] platform-bus: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/27
- [PULL 25/53] xen-legacy-backend: Add missing typedef XenLegacyDevice, Eduardo Habkost, 2020/08/27