From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MneWB-0000d1-O1 for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:20:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MneW6-0000al-Tc for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:20:51 -0400 Received: from [199.232.76.173] (port=59915 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MneW6-0000ac-Q4 for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:20:46 -0400 Received: from mail-ew0-f221.google.com ([209.85.219.221]:37342) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MneW6-0004nI-IL for qemu-devel@nongnu.org; Tue, 15 Sep 2009 16:20:46 -0400 Received: by ewy21 with SMTP id 21so418737ewy.8 for ; Tue, 15 Sep 2009 13:20:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090915143319.GB24708@redhat.com> References: <20090915143319.GB24708@redhat.com> From: Blue Swirl Date: Tue, 15 Sep 2009 23:20:25 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH 1/2] qemu/qdev: type safety in reset handler Content-Type: text/plain; charset=UTF-8 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, qemu-devel@nongnu.org, Christian Borntraeger , kraxel@redhat.com, Avi Kivity , Paul Brook 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, how about instead: static void rtl8139_reset(struct DeviceState *d) { RTL8139State *s = container_of(d, RTL8139State, dev.qdev); ?