From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCBlm-0001YY-1I for qemu-devel@nongnu.org; Sat, 08 Feb 2014 12:32:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCBlh-00042t-6M for qemu-devel@nongnu.org; Sat, 08 Feb 2014 12:32:45 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45877 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCBlg-00042n-Vs for qemu-devel@nongnu.org; Sat, 08 Feb 2014 12:32:41 -0500 Message-ID: <52F66A34.9090604@suse.de> Date: Sat, 08 Feb 2014 18:32:36 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1391610653-13439-1-git-send-email-afaerber@suse.de> <20140205155623.772a6c35@thinkpad> In-Reply-To: <20140205155623.772a6c35@thinkpad> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] nand: Don't use qdev_create() in nand_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , Paolo Bonzini Cc: Kevin Wolf , peter.maydell@linaro.org, Peter Crosthwaite , qemu-devel@nongnu.org, Stefan Hajnoczi Am 05.02.2014 15:56, schrieb Igor Mammedov: > On Wed, 5 Feb 2014 15:30:53 +0100 > Andreas F=E4rber wrote: >=20 >> Commit 7426aa72c36c908a7d0eae3e38568bb0a70de479 (nand: Don't inherit >> from Sysbus) changed the parent type of TYPE_NAND but continued to use >> qdev_create(), which handled a NULL BusState as SysBus. >> >> Use object_new() instead, and reuse the TYPE_NAND define while at it. >> >> Reported-by: Markus Armbruster >> Cc: Peter Crosthwaite >> Signed-off-by: Andreas F=E4rber >> --- >> hw/block/nand.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/block/nand.c b/hw/block/nand.c >> index a871ce0..6d7c804 100644 >> --- a/hw/block/nand.c >> +++ b/hw/block/nand.c >> @@ -632,7 +632,7 @@ DeviceState *nand_init(BlockDriverState *bdrv, int= manf_id, int chip_id) >> if (nand_flash_ids[chip_id].size =3D=3D 0) { >> hw_error("%s: Unsupported NAND chip ID.\n", __FUNCTION__); >> } >> - dev =3D qdev_create(NULL, "nand"); >> + dev =3D DEVICE(object_new(TYPE_NAND)); >> qdev_prop_set_uint8(dev, "manufacturer_id", manf_id); >> qdev_prop_set_uint8(dev, "chip_id", chip_id); >> if (bdrv) { >> --=20 >> 1.8.4.5 >> >> >=20 > Reviewed-By: Igor Mammedov Thanks, applied to qom-next: https://github.com/afaerber/qemu-cpu/commits/qom-next Paolo, if you want your "all three patches can be applied" to be recorded, please reply with a proper tag! Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg