From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Michael Roth" <mdroth@linux.vnet.ibm.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"Thomas Huth" <thuth@redhat.com>, "Jiri Pirko" <jiri@resnulli.us>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"open list:S390 KVM CPUs" <qemu-s390x@nongnu.org>,
vsementsov@virtuozzo.com, stefanha@redhat.com,
"David Gibson" <david@gibson.dropbear.id.au>,
kwolf@redhat.com, "open list:GLUSTER" <integration@gluster.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Max Reitz" <mreitz@redhat.com>,
"open list:ARM TCG CPUs" <qemu-arm@nongnu.org>,
"open list:PowerPC TCG CPUs" <qemu-ppc@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH v5 12/12] qapi: Use QAPI_LIST_ADD() where possible
Date: Fri, 23 Oct 2020 15:23:04 -0500 [thread overview]
Message-ID: <a8e32a7b-c895-5f3b-14ec-50e5af9426b1@redhat.com> (raw)
In-Reply-To: <20201023183652.478921-13-eblake@redhat.com>
On 10/23/20 1:36 PM, 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.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> docs/devel/writing-qmp-commands.txt | 13 +++------
> +++ b/docs/devel/writing-qmp-commands.txt
> @@ -531,15 +531,10 @@ TimerAlarmMethodList *qmp_query_alarm_methods(Error **errp)
> bool current = true;
>
> for (p = alarm_timers; p->name; p++) {
> - TimerAlarmMethodList *info = g_malloc0(sizeof(*info));
> - info->value = g_malloc0(sizeof(*info->value));
> - info->value->method_name = g_strdup(p->name);
> - info->value->current = current;
> -
> - current = false;
> -
> - info->next = method_list;
> - method_list = info;
> + TimerAlarmMethod *value = g_new0(TimerAlarmMethod, 1);
> + value->method_name = g_strdup(p->name);
Oops, tab damage.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-10-23 20:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 18:36 [PATCH v5 00/12] Exposing backing-chain allocation over NBD Eric Blake
2020-10-23 18:36 ` [PATCH v5 01/12] qapi: Move GenericList to qapi/util.h Eric Blake
2020-10-24 9:06 ` Vladimir Sementsov-Ogievskiy
2020-10-26 14:18 ` Markus Armbruster
2020-10-26 14:22 ` Eric Blake
2020-10-23 18:36 ` [PATCH v5 02/12] qapi: Make QAPI_LIST_ADD() public Eric Blake
2020-10-24 9:10 ` Vladimir Sementsov-Ogievskiy
2020-10-26 14:25 ` Markus Armbruster
2020-10-26 14:37 ` Eric Blake
2020-10-26 14:38 ` Eric Blake
2020-10-23 18:36 ` [PATCH v5 03/12] nbd: Utilize QAPI_CLONE for type conversion Eric Blake
2020-10-24 9:17 ` Vladimir Sementsov-Ogievskiy
2020-10-26 14:41 ` Markus Armbruster
2020-10-23 18:36 ` [PATCH v5 04/12] nbd: Add new qemu:allocation-depth metadata context Eric Blake
2020-10-23 18:36 ` [PATCH v5 05/12] nbd: Add 'qemu-nbd -A' to expose allocation depth Eric Blake
2020-10-23 18:36 ` [PATCH v5 06/12] nbd: Update qapi to support exporting multiple bitmaps Eric Blake
2020-10-26 10:50 ` Peter Krempa
2020-10-26 13:06 ` Eric Blake
2020-10-23 18:36 ` [PATCH v5 07/12] nbd: Simplify qemu bitmap context name Eric Blake
2020-10-23 18:36 ` [PATCH v5 08/12] nbd: Refactor counting of metadata contexts Eric Blake
2020-10-23 18:36 ` [PATCH v5 09/12] nbd: Allow export of multiple bitmaps for one device Eric Blake
2020-10-23 18:36 ` [PATCH v5 10/12] block: Return depth level during bdrv_is_allocated_above Eric Blake
2020-10-24 9:49 ` Vladimir Sementsov-Ogievskiy
2020-10-26 12:26 ` Vladimir Sementsov-Ogievskiy
2020-10-23 18:36 ` [PATCH v5 11/12] nbd: Expose actual depth in qemu:allocation-depth Eric Blake
2020-10-24 9:59 ` Vladimir Sementsov-Ogievskiy
2020-10-26 12:31 ` Eric Blake
2020-10-23 18:36 ` [PATCH v5 12/12] qapi: Use QAPI_LIST_ADD() where possible Eric Blake
2020-10-23 20:23 ` Eric Blake [this message]
2020-10-23 18:44 ` [PATCH v5 00/12] Exposing backing-chain allocation over NBD Eric Blake
2020-10-26 14:54 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8e32a7b-c895-5f3b-14ec-50e5af9426b1@redhat.com \
--to=eblake@redhat.com \
--cc=aleksandar.rikalo@syrmia.com \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=integration@gluster.org \
--cc=jasowang@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=jiri@resnulli.us \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).