From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDBVh-0002dl-9e for qemu-devel@nongnu.org; Wed, 15 Jun 2016 10:09:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDBVe-0000fL-HZ for qemu-devel@nongnu.org; Wed, 15 Jun 2016 10:09:37 -0400 Received: from 16.mo6.mail-out.ovh.net ([87.98.139.208]:58263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDBVe-0000f9-Ba for qemu-devel@nongnu.org; Wed, 15 Jun 2016 10:09:34 -0400 Received: from player738.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id 6555AFFB008 for ; Wed, 15 Jun 2016 16:09:33 +0200 (CEST) References: <1465999230-28050-1-git-send-email-clg@kaod.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <57616194.5090100@kaod.org> Date: Wed, 15 Jun 2016 16:09:24 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , Kevin Wolf , Qemu-block , Marcin Krzeminski , QEMU Developers , Max Reitz On 06/15/2016 04:07 PM, Peter Maydell wrote: > On 15 June 2016 at 15:00, C=C3=A9dric Le Goater wrote: >> We also need to realize() the SSISlave part of the object. This is why >> the previous realize() ops is stored in M25P80Class and called in the >> object realize() ops. >> >> This is fully compatible with the existing users of m25p80 and it >> provides a way to handle errors on the drive backend. >> >> Signed-off-by: C=C3=A9dric Le Goater >> --- >=20 >> +static void m25p80_realize(DeviceState *dev, Error **errp) >> +{ >> + Flash *s =3D M25P80(dev); >> + M25P80Class *mc =3D M25P80_GET_CLASS(s); >> + DriveInfo *dinfo; >> + >> + /* initialize the SSISlave part */ >> + mc->parent_dc_realize(dev, errp); >> >> - /* FIXME use a qdev drive property instead of drive_get_next() */ >> dinfo =3D drive_get_next(IF_MTD); >=20 > Why have you removed the FIXME comment ? This is an error. I should not have removed this one. Only the one relate= d=20 on late-init :/ C.