From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQFPK-0007Q3-Bu for qemu-devel@nongnu.org; Thu, 21 Jul 2016 10:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQFPG-0001GD-Ez for qemu-devel@nongnu.org; Thu, 21 Jul 2016 10:57:02 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:51130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQFPG-0001Ey-72 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 10:56:58 -0400 Date: Thu, 21 Jul 2016 10:56:55 -0400 (EDT) From: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Message-ID: <509038624.7108827.1469113015791.JavaMail.zimbra@redhat.com> In-Reply-To: <1469112292-30548-2-git-send-email-minyard@acm.org> References: <1469112292-30548-1-git-send-email-minyard@acm.org> <1469112292-30548-2-git-send-email-minyard@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/3] wdt_i6300esb: Free timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: minyard@acm.org Cc: qemu-devel@nongnu.org, Corey Minyard , "Richard W . M . Jones" Hi ----- Original Message ----- > From: Corey Minyard >=20 > Add an exit function to free the timer allocated in the > realize function. >=20 > Signed-off-by: Corey Minyard > Cc: Richard W.M. Jones > Cc: Marc-Andr=C3=A9 Lureau > --- > hw/watchdog/wdt_i6300esb.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c > index a83d951..49b3cd1 100644 > --- a/hw/watchdog/wdt_i6300esb.c > +++ b/hw/watchdog/wdt_i6300esb.c > @@ -428,6 +428,14 @@ static void i6300esb_realize(PCIDevice *dev, Error > **errp) > /* qemu_register_coalesced_mmio (addr, 0x10); ? */ > } > =20 > +static void i6300esb_exit(PCIDevice *dev) > +{ > + I6300State *d =3D WATCHDOG_I6300ESB_DEVICE(dev); > + > + timer_del(d->timer); > + timer_free(d->timer); > +} Reviewed-by: Marc-Andr=C3=A9 Lureau > + > static WatchdogTimerModel model =3D { > .wdt_name =3D "i6300esb", > .wdt_description =3D "Intel 6300ESB", > @@ -441,6 +449,7 @@ static void i6300esb_class_init(ObjectClass *klass, v= oid > *data) > k->config_read =3D i6300esb_config_read; > k->config_write =3D i6300esb_config_write; > k->realize =3D i6300esb_realize; > + k->exit =3D i6300esb_exit; > k->vendor_id =3D PCI_VENDOR_ID_INTEL; > k->device_id =3D PCI_DEVICE_ID_INTEL_ESB_9; > k->class_id =3D PCI_CLASS_SYSTEM_OTHER; > -- > 2.7.4 >=20 >=20