qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] vmstate: Useless post_save?


From: Jan Kiszka
Subject: [Qemu-devel] vmstate: Useless post_save?
Date: Sat, 08 May 2010 00:39:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Hi all,

I wondered why we have the post_save callback in vmstate. Conceptually,
it made no sense to me. So I grep'ed for its users - and found exactly
one: tmp105. As suspected, only "strange" code was found:

static void tmp105_post_save(void *opaque)
{
    TMP105State *s = opaque;
    s->faults = tmp105_faultq[(s->config >> 3) & 3];            /* F */
}

First, s->config cannot be changed by saving the state. And, second,
s->faults is only written by this driver, never read.

Anyone any concerns dropping 'faults' from tmp105 and then dropping the
post_save handler from vmstate?

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]