qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] replace duplicated code.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] replace duplicated code.
Date: Thu, 18 Jun 2009 11:48:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

-            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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]