From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEZtC-0000OV-LM for qemu-devel@nongnu.org; Wed, 28 Aug 2013 03:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEZt5-0003aY-4p for qemu-devel@nongnu.org; Wed, 28 Aug 2013 03:10:02 -0400 Message-ID: <1377673787.20403.16.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Wed, 28 Aug 2013 09:09:47 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/9] char: introduce tcp_chr_detach() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Paolo Bonzini , qemu-stable@nongnu.org, qemu list , Anthony Liguori , Hans de Goede Hi, > +static void tcp_chr_detach(CharDriverState *chr) > +{ > + TCPCharDriver *s = chr->opaque; > + > + if (s->tag) { > + io_remove_watch_poll(s->tag); > + s->tag = 0; > + } > +} Lots of simliar functions in the other patches. Doesn't it make sense to move the tag field from TCPCharDriver to CharDriverState instead, so we don't need a new callback in the first place? cheers, Gerd