From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnfOO-00016V-AH for qemu-devel@nongnu.org; Tue, 15 Sep 2009 17:16:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnfOJ-00015q-Li for qemu-devel@nongnu.org; Tue, 15 Sep 2009 17:16:51 -0400 Received: from [199.232.76.173] (port=37467 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnfOJ-00015n-C8 for qemu-devel@nongnu.org; Tue, 15 Sep 2009 17:16:47 -0400 Received: from mail-fx0-f211.google.com ([209.85.220.211]:64756) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MnfOI-0006Wc-IU for qemu-devel@nongnu.org; Tue, 15 Sep 2009 17:16:46 -0400 Received: by fxm7 with SMTP id 7so3101794fxm.34 for ; Tue, 15 Sep 2009 14:16:45 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4AB0043A.3040507@gnu.org> Date: Tue, 15 Sep 2009 23:16:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20090915143319.GB24708@redhat.com> <20090915204205.GB27954@redhat.com> In-Reply-To: <20090915204205.GB27954@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/2] qemu/qdev: type safety in reset handler List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Carsten Otte , markmc@redhat.com, Paul Brook , qemu-devel@nongnu.org, Blue Swirl , Christian Borntraeger , kraxel@redhat.com, Avi Kivity On 09/15/2009 10:42 PM, Michael S. Tsirkin wrote: > 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); He means not introducing pci_rtl8139_reset. Paolo