[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/7] qapi: Use QAPI_LIST_PREPEND() where possible
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2 4/7] qapi: Use QAPI_LIST_PREPEND() where possible |
Date: |
Tue, 17 Nov 2020 11:45:08 +0000 |
On Thu, Nov 12, 2020 at 07:13:37PM -0600, Eric Blake wrote:
> Anywhere we create a list of just one item or by prepending items
> (typically because order doesn't matter), we can use the now-public
> macro. But places where we must keep the list in order by appending
> remain open-coded until later patches.
>
> Note that as a side effect, this also performs a cleanup of two minor
> issues in qga/commands-posix.c: the old code was performing
> new = g_malloc0(sizeof(*ret));
> which 1) is confusing because you have to verify whether 'new' and
> 'ret' are variables with the same type, and 2) would conflict with C++
> compilation (not an actual problem for this file, but makes
> copy-and-paste harder).
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> docs/devel/writing-qmp-commands.txt | 12 +--
> block/gluster.c | 4 +-
> block/qapi.c | 7 +-
> chardev/char.c | 20 ++---
> hw/core/machine-qmp-cmds.c | 6 +-
> hw/core/machine.c | 11 +--
> hw/net/rocker/rocker_of_dpa.c | 20 ++---
> hw/net/virtio-net.c | 21 ++----
> migration/migration.c | 7 +-
> migration/postcopy-ram.c | 7 +-
> monitor/hmp-cmds.c | 13 ++--
> monitor/misc.c | 25 +++---
> monitor/qmp-cmds-control.c | 10 +--
> qemu-img.c | 5 +-
> qga/commands-posix-ssh.c | 7 +-
> qga/commands-posix.c | 46 +++--------
> qga/commands-win32.c | 32 ++------
> qga/commands.c | 6 +-
> qom/qom-qmp-cmds.c | 29 ++-----
> target/arm/helper.c | 6 +-
> target/arm/monitor.c | 13 +---
> target/i386/cpu.c | 6 +-
> target/mips/helper.c | 6 +-
> target/s390x/cpu_models.c | 12 +--
> tests/test-clone-visitor.c | 7 +-
> tests/test-qobject-output-visitor.c | 42 +++++------
> tests/test-visitor-serialization.c | 113 ++++------------------------
> trace/qmp.c | 22 +++---
> ui/input.c | 16 ++--
> ui/vnc.c | 21 ++----
> util/qemu-config.c | 14 +---
> target/ppc/translate_init.c.inc | 12 +--
> 32 files changed, 158 insertions(+), 420 deletions(-)
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature