From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBgW9-0002LJ-J4 for qemu-devel@nongnu.org; Thu, 15 Jan 2015 04:15:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBgW3-0006Ek-Q6 for qemu-devel@nongnu.org; Thu, 15 Jan 2015 04:15:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBgW3-0006EL-Ih for qemu-devel@nongnu.org; Thu, 15 Jan 2015 04:14:59 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0F9EwWx003530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 15 Jan 2015 04:14:58 -0500 Message-ID: <54B7850E.9010408@redhat.com> Date: Thu, 15 Jan 2015 10:14:54 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1420711408-15766-1-git-send-email-pbonzini@redhat.com> <1420711408-15766-5-git-send-email-pbonzini@redhat.com> <20150115090414.GA6102@grmbl.mre> In-Reply-To: <20150115090414.GA6102@grmbl.mre> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org On 15/01/2015 10:04, Amit Shah wrote: > >> > diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h >> > index e45fc49..55ba584 100644 >> > --- a/include/migration/vmstate.h >> > +++ b/include/migration/vmstate.h >> > @@ -642,17 +642,29 @@ extern const VMStateInfo vmstate_info_bitmap; >> > #define VMSTATE_FLOAT64(_f, _s) \ >> > VMSTATE_FLOAT64_V(_f, _s, 0) >> > >> > -#define VMSTATE_TIMER_TEST(_f, _s, _test) \ >> > +#define VMSTATE_TIMER_PTR_TEST(_f, _s, _test) \ >> > VMSTATE_POINTER_TEST(_f, _s, _test, vmstate_info_timer, QEMUTimer *) >> > >> > -#define VMSTATE_TIMER_V(_f, _s, _v) \ >> > +#define VMSTATE_TIMER_PTR_V(_f, _s, _v) \ >> > VMSTATE_POINTER(_f, _s, _v, vmstate_info_timer, QEMUTimer *) >> > >> > +#define VMSTATE_TIMER_PTR(_f, _s) \ >> > + VMSTATE_TIMER_PTR_V(_f, _s, 0) >> > + >> > +#define VMSTATE_TIMER_PTR_ARRAY(_f, _s, _n) \ >> > + VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_timer, QEMUTimer *) >> > + >> > +#define VMSTATE_TIMER_TEST(_f, _s, _test) \ >> > + VMSTATE_SINGLE_TEST(_f, _s, _test, 0, vmstate_info_timer, QEMUTimer) >> > + >> > +#define VMSTATE_TIMER_V(_f, _s, _v) \ >> > + VMSTATE_SINGLE(_f, _s, _v, vmstate_info_timer, QEMUTimer) >> > + >> > #define VMSTATE_TIMER(_f, _s) \ >> > VMSTATE_TIMER_V(_f, _s, 0) > Why leave this around? Because further changes down the line will convert QEMUTimer* to QEMUTimer and thus go back to VMSTATE_TIMER. Having both around avoids having a single patch with -1000/+1000 diffstat. Paolo