From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAWCT-0002z2-EK for qemu-devel@nongnu.org; Fri, 07 May 2010 18:39:17 -0400 Received: from [140.186.70.92] (port=37221 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAWCS-0002xv-7p for qemu-devel@nongnu.org; Fri, 07 May 2010 18:39:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAWCQ-0001kz-L0 for qemu-devel@nongnu.org; Fri, 07 May 2010 18:39:16 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:40782) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAWCQ-0001kp-Ce for qemu-devel@nongnu.org; Fri, 07 May 2010 18:39:14 -0400 Message-ID: <4BE4968B.6050805@web.de> Date: Sat, 08 May 2010 00:39:07 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2A3279B9367D3E49D102385D" Sender: jan.kiszka@web.de Subject: [Qemu-devel] vmstate: Useless post_save? List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela , andrzej zaborowski Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2A3279B9367D3E49D102385D Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 =3D opaque; s->faults =3D 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 --------------enig2A3279B9367D3E49D102385D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkvklo8ACgkQitSsb3rl5xQXvgCeLsz9Eo3Z7LZ1a6Fwz4ZCqQvb 6WEAn19uZdh9EIVuX0EeiuaqH6clICRO =pgeN -----END PGP SIGNATURE----- --------------enig2A3279B9367D3E49D102385D--