From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsIjG-00049v-TI for qemu-devel@nongnu.org; Sun, 15 Dec 2013 15:56:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsIj9-0005S1-6s for qemu-devel@nongnu.org; Sun, 15 Dec 2013 15:55:58 -0500 Received: from cantor2.suse.de ([195.135.220.15]:53830 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsIj9-0005Rx-08 for qemu-devel@nongnu.org; Sun, 15 Dec 2013 15:55:51 -0500 Message-ID: <52AE1752.2080605@suse.de> Date: Sun, 15 Dec 2013 21:55:46 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1385718225-26379-1-git-send-email-armbru@redhat.com> <1385718225-26379-2-git-send-email-armbru@redhat.com> In-Reply-To: <1385718225-26379-2-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] hw: cannot_instantiate_with_device_add_yet due to pointer props List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: marcel.a@redhat.com, armbru@redhat.com, chouteau@adacore.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, kraxel@redhat.com, aliguori@amazon.com, edgar.iglesias@gmail.com Peter, Am 29.11.2013 10:43, schrieb armbru@redhat.com: > From: Markus Armbruster >=20 > Pointer properties can be set only by code, not by device_add. A > device with a pointer property can work with device_add only when the > property may remain null. >=20 > This is the case for property "interrupt_vector" of device > "etraxfs,pic". Add a comment there. >=20 > Set cannot_instantiate_with_device_add_yet for the other devices with > pointer properties, with a comment explaining why. >=20 > Juha Riihim=C3=A4ki and Peter Maydell deserve my thanks for making "poi= nter > property must not remain null" blatantly obvious in the OMAP devices. >=20 > Only device "smbus-eeprom" is actually changed. The others are all > sysbus devices, which get cannot_instantiate_with_device_add_yet set > in their abstract base's class init function. Setting it again in > their class init function is technically redundant, but serves as > insurance for when sysbus devices become available with device_add, > and as documentation. >=20 > Signed-off-by: Markus Armbruster > --- > hw/audio/marvell_88w8618.c | 2 ++ > hw/dma/sparc32_dma.c | 2 ++ > hw/gpio/omap_gpio.c | 4 ++++ > hw/i2c/omap_i2c.c | 2 ++ > hw/i2c/smbus_eeprom.c | 2 ++ > hw/intc/etraxfs_pic.c | 4 ++++ > hw/intc/grlib_irqmp.c | 2 ++ > hw/intc/omap_intc.c | 4 ++++ > hw/net/etraxfs_eth.c | 2 ++ > hw/net/lance.c | 2 ++ > 10 files changed, 26 insertions(+) Since you're mentioned by name, should I wait for you to review the three OMAP parts? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg