[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 13/31] qapi: Drop unused 'kind' for struct/en
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH v7 13/31] qapi: Drop unused 'kind' for struct/enum visit |
Date: |
Tue, 8 Dec 2015 15:40:09 +1100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Dec 07, 2015 at 08:55:03PM -0700, Eric Blake wrote:
> visit_start_struct() and visit_type_enum() had a 'kind' argument
> that was usually set to either the stringized version of the
> corresponding qapi type name, or to NULL (although some clients
> didn't even get that right). But nothing ever used the argument.
> It's even hard to argue that it would be useful in a debugger,
> as a stack backtrace also tells which type is being visited.
>
> Therefore, drop the 'kind' argument as dead. While at it, change
> the signature of visit_start_struct() to place the 'name'
> argument at the end (other than 'errp'), and the 'size' argument
> next to 'obj'; this placement of 'name' matches matches how all
> other functions in visit.h do it (visit_type_enum() places
> 'strings' between 'obj' and 'name'; visit_get_next_type() places
> 'promote_int' between 'type' and 'name'). This also avoids the
> confusion caused by splitting related pieces of information,
> where the old signature an unrelated parameter in between the
> "typename" and sizeof(typename) arguments.
>
> Signed-off-by: Eric Blake <address@hidden>
For spapr parts:
Acked-by: David Gibson <address@hidden>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v7 06/31] balloon: Improve use of qapi visitor, (continued)
- [Qemu-devel] [PATCH v7 06/31] balloon: Improve use of qapi visitor, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 03/31] qapi: Drop dead dealloc visitor variable, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 01/31] qobject: Document more shortcomings in our number handling, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 11/31] qapi: Consolidate visitor small integer callbacks, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 05/31] vl: Improve use of qapi visitor, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 02/31] qapi: Avoid use of misnamed DO_UPCAST(), Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 10/31] qapi: Make all visitors supply uint64 callbacks, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 12/31] qapi: Don't cast Enum* to int*, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 15/31] qmp: Fix reference-counting of qnull on empty output visit, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 13/31] qapi: Drop unused 'kind' for struct/enum visit, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 18/31] qapi: Add visit_type_null() visitor, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 08/31] qapi: Track all failures between visit_start/stop, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 07/31] qapi: Improve generated event use of qapi visitor, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 14/31] qapi: Drop unused error argument for list and implicit struct, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 22/31] qapi: Add type.is_empty() helper, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 20/31] spapr_drc: Expose 'null' in qom-get when there is no fdt, Eric Blake, 2015/12/07
- [Qemu-devel] [PATCH v7 24/31] qapi: Eliminate empty visit_type_FOO_fields, Eric Blake, 2015/12/07