[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/31] balloon: Improve use of qapi visitor
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 13/31] balloon: Improve use of qapi visitor |
Date: |
Tue, 9 Feb 2016 12:37:45 +0100 |
From: Eric Blake <address@hidden>
Rework the control flow of balloon_stats_get_all() to make it
easier for a later patch to split visit_end_struct(). Also
switch to the uint64 visitor to match the data type.
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
hw/virtio/virtio-balloon.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 5c30203..06912bb 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -133,9 +133,11 @@ static void balloon_stats_get_all(Object *obj, struct
Visitor *v,
if (err) {
goto out_end;
}
- for (i = 0; !err && i < VIRTIO_BALLOON_S_NR; i++) {
- visit_type_int64(v, (int64_t *) &s->stats[i], balloon_stat_names[i],
- &err);
+ for (i = 0; i < VIRTIO_BALLOON_S_NR; i++) {
+ visit_type_uint64(v, &s->stats[i], balloon_stat_names[i], &err);
+ if (err) {
+ break;
+ }
}
error_propagate(errp, err);
err = NULL;
--
2.4.3
- [Qemu-devel] [PULL 07/31] qapi: Drop dead dealloc visitor variable, (continued)
- [Qemu-devel] [PULL 07/31] qapi: Drop dead dealloc visitor variable, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 05/31] qobject: Document more shortcomings in our number handling, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 10/31] hmp: Drop pointless allocation during qapi visit, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 20/31] qapi: Don't cast Enum* to int*, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 26/31] qapi: Tighten qmp_input_end_list(), Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 30/31] qapi: Fix compilation failure on MIPS and SPARC, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 28/31] qmp: Fix reference-counting of qnull on empty output visit, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 29/31] qmp: Don't abuse stack to track qmp-output root, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 08/31] qapi: Dealloc visitor does not need a type_size(), Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 12/31] vl: Ensure qapi visitor properly ends struct visit, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 13/31] balloon: Improve use of qapi visitor,
Markus Armbruster <=
- [Qemu-devel] [PULL 16/31] qapi-visit: Kill unused visit_end_union(), Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 14/31] qapi: Improve generated event use of qapi visitor, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 17/31] qapi: Prefer type_int64 over type_int in visitors, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 27/31] qapi: Drop unused error argument for list and implicit struct, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 25/31] qapi: Drop unused 'kind' for struct/enum visit, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 23/31] qom: Swap 'name' next to visitor in ObjectPropertyAccessor, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 04/31] tests: Use Python 2.6 "except E as ..." syntax, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 22/31] qapi: Swap visit_* arguments for consistent 'name' placement, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 15/31] qapi: Track all failures between visit_start/stop, Markus Armbruster, 2016/02/09
- [Qemu-devel] [PULL 11/31] hmp: Cache use of qapi visitor, Markus Armbruster, 2016/02/09