From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rldto-0001J3-J4 for qemu-devel@nongnu.org; Fri, 13 Jan 2012 04:58:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rldti-0001et-Um for qemu-devel@nongnu.org; Fri, 13 Jan 2012 04:58:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rldti-0001el-OE for qemu-devel@nongnu.org; Fri, 13 Jan 2012 04:58:10 -0500 Date: Fri, 13 Jan 2012 15:28:05 +0530 From: Amit Shah Message-ID: <20120113095805.GB9506@amit.redhat.com> References: <915d33eb055b4d388fda85c385b459e5631f91fe.1326448314.git.amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <915d33eb055b4d388fda85c385b459e5631f91fe.1326448314.git.amit.shah@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-console: no need to remove char handlers explicitly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu list Cc: Gerd Hoffmann , Markus Armbruster On (Fri) 13 Jan 2012 [15:24:59], Amit Shah wrote: > qdev is now equipped (thanks to the last commit) to disassociate > chardevs from the qdev devices on the devices going away. So doing it > in the virtio-console driver is not necessary. > > Since that was the only thing being done in the qdev exit method, drop > it entirely. Commit message is correct, patch is not. Updated patch coming soon.. > diff --git a/hw/virtio-console.c b/hw/virtio-console.c > index 73d866a..9275fd9 100644 > --- a/hw/virtio-console.c > +++ b/hw/virtio-console.c > @@ -127,16 +127,6 @@ static int virtconsole_initfn(VirtIOSerialPort *port) > > static int virtconsole_exitfn(VirtIOSerialPort *port) > { > - VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port); > - > - if (vcon->chr) { > - /* > - * Instead of closing the chardev, free it so it can be used > - * for other purposes. > - */ > - qemu_chr_add_handlers(vcon->chr, NULL, NULL, NULL, NULL); > - } > - > return 0; > } Amit