From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHEEY-00061c-Gi for qemu-devel@nongnu.org; Thu, 18 Jun 2009 05:48:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHEET-00060J-IH for qemu-devel@nongnu.org; Thu, 18 Jun 2009 05:48:37 -0400 Received: from [199.232.76.173] (port=57735 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHEET-00060G-At for qemu-devel@nongnu.org; Thu, 18 Jun 2009 05:48:33 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50335) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHEES-0000SM-S5 for qemu-devel@nongnu.org; Thu, 18 Jun 2009 05:48:33 -0400 Message-ID: <4A3A0D6C.9080002@redhat.com> Date: Thu, 18 Jun 2009 11:48:28 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] replace duplicated code. References: <1245279129-6768-1-git-send-email-glommer@redhat.com> In-Reply-To: <1245279129-6768-1-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org > - dev = qdev_create(&bus->qbus, pci_nic_names[i]); > - qdev_set_prop_int(dev, "devfn", devfn); > - qdev_set_prop_ptr(dev, "name", (void *)pci_nic_names[i]); > - qdev_set_netdev(dev, nd); > - qdev_init(dev); > + d = pci_create_simple(bus, devfn, pci_nic_names[i]); > + qdev_set_netdev((DeviceState *)d, nd); You have changed the ordering of the qdev_set_netdev and qdev_init calls. I don't think this is correct, the init callback will not see the nicinfo then. cheers, Gerd