From: Juan Quintela <quintela@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/3] savevm: Convert loadvm handlers list to LIST
Date: Tue, 01 Sep 2009 00:08:43 +0200 [thread overview]
Message-ID: <m3d46b3ac4.fsf@neno.mitica> (raw)
In-Reply-To: <20090831160020.3799813c@doriath> (Luiz Capitulino's message of "Mon, 31 Aug 2009 16:00:20 -0300")
Luiz Capitulino <lcapitulino@redhat.com> wrote:
> On Fri, 28 Aug 2009 22:31:57 +0200
> Juan Quintela <quintela@redhat.com> wrote:
>
>>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>> savevm.c | 20 +++++++++++---------
>> 1 files changed, 11 insertions(+), 9 deletions(-)
>>
>> diff --git a/savevm.c b/savevm.c
>> index baef277..9836c60 100644
>> --- a/savevm.c
>> +++ b/savevm.c
>> @@ -1260,10 +1260,10 @@ static SaveStateEntry *find_se(const char *idstr, int instance_id)
>> }
>>
>> typedef struct LoadStateEntry {
>> + LIST_ENTRY(LoadStateEntry) entry;
>> SaveStateEntry *se;
>> int section_id;
>> int version_id;
>> - struct LoadStateEntry *next;
>> } LoadStateEntry;
>>
>> static int qemu_loadvm_state_v2(QEMUFile *f)
>> @@ -1309,7 +1309,8 @@ static int qemu_loadvm_state_v2(QEMUFile *f)
>>
>> int qemu_loadvm_state(QEMUFile *f)
>> {
>> - LoadStateEntry *first_le = NULL;
>> + LIST_HEAD(, LoadStateEntry) loadvm_handlers;
>
> You're missing the initialization here, spot this while
> testing staging.
I looked at aio.c and guess what :) No LIST_INIT() either.
My understanding is that it is not needed (but it is better to add it,
just in case the implementation change).
#define LIST_HEAD_INITIALIZER(head) \
{ NULL }
#define LIST_INIT(head) do { \
(head)->lh_first = NULL; \
} while (/*CONSTCOND*/0)
This should be what it does without puting it. Perhaps we should
"correct" also the other users?
Later, Juan.
next prev parent reply other threads:[~2009-08-31 22:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 20:31 [Qemu-devel] [PATCH 0/3] Bring savevm.c to the wonderful world of sys-queue.h Juan Quintela
2009-08-28 20:31 ` [Qemu-devel] [PATCH 1/3] savevm: Convert savevm handlers list to TAILQ Juan Quintela
2009-09-01 8:33 ` Gerd Hoffmann
2009-08-28 20:31 ` [Qemu-devel] [PATCH 2/3] Add LIST_FOREACH_SAFE() definition Juan Quintela
2009-08-28 20:31 ` [Qemu-devel] [PATCH 3/3] savevm: Convert loadvm handlers list to LIST Juan Quintela
2009-08-31 19:00 ` Luiz Capitulino
2009-08-31 22:08 ` Juan Quintela [this message]
2009-08-31 22:27 ` [Qemu-devel] " Luiz Capitulino
2009-09-01 0:25 ` Juan Quintela
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=m3d46b3ac4.fsf@neno.mitica \
--to=quintela@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).