From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMDhT-0000Ft-4S for qemu-devel@nongnu.org; Tue, 26 Aug 2014 06:10:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMDhH-0007Ho-Nh for qemu-devel@nongnu.org; Tue, 26 Aug 2014 06:10:03 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:37676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMDhH-0007HY-Hd for qemu-devel@nongnu.org; Tue, 26 Aug 2014 06:09:51 -0400 Received: by mail-we0-f171.google.com with SMTP id p10so14612846wes.16 for ; Tue, 26 Aug 2014 03:09:50 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53FC5CEB.2080803@redhat.com> Date: Tue, 26 Aug 2014 12:09:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20140826071427.1672.48119.stgit@PASHA-ISP> <20140826071457.1672.77017.stgit@PASHA-ISP> In-Reply-To: <20140826071457.1672.77017.stgit@PASHA-ISP> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 05/12] serial: fixing vmstate for save/restore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: zealot351@gmail.com, maria.klimushenkova@ispras.ru Il 26/08/2014 09:14, Pavel Dovgalyuk ha scritto: > +static int serial_pre_load(void *opaque) > +{ > + SerialState *s = (SerialState *)opaque; > + s->thr_ipending = -1; > + timer_del(s->fifo_timeout_timer); > + s->timeout_ipending = 0; > + s->poll_msl = -1; > + timer_del(s->modem_status_poll); > + return 0; > +} The two timer_dels and s->timeout_ipending = 0 should be in the reset function rather than here. The two assignments of -1 are correct here. Thanks, Paolo