From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mnet9-0007rV-1x for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:44:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mnet4-0007nU-Jo for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:44:34 -0400 Received: from [199.232.76.173] (port=55277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mnet4-0007nH-GR for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:44:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1868) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mnet3-0000Xy-Gm for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:44:30 -0400 Date: Tue, 15 Sep 2009 23:42:05 +0300 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH 1/2] qemu/qdev: type safety in reset handler Message-ID: <20090915204205.GB27954@redhat.com> References: <20090915143319.GB24708@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Carsten Otte , markmc@redhat.com, qemu-devel@nongnu.org, Christian Borntraeger , kraxel@redhat.com, Avi Kivity , Paul Brook On Tue, Sep 15, 2009 at 11:20:25PM +0300, Blue Swirl wrote: > On Tue, Sep 15, 2009 at 5:33 PM, Michael S. Tsirkin wrote: > > Add type safety to qdev reset handlers, by declaring them as > > DeviceState * rather than void *. > > The function seems a bit unnecessary, which function? > how about instead: instead of which one? > static void rtl8139_reset(struct DeviceState *d) > { > RTL8139State *s = container_of(d, RTL8139State, dev.qdev); > > ?