From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDBU8-0001J8-IM for qemu-devel@nongnu.org; Wed, 15 Jun 2016 10:08:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDBU6-0000Ba-HK for qemu-devel@nongnu.org; Wed, 15 Jun 2016 10:07:59 -0400 Received: from mail-vk0-x22e.google.com ([2607:f8b0:400c:c05::22e]:33413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDBU5-0000AS-9f for qemu-devel@nongnu.org; Wed, 15 Jun 2016 10:07:58 -0400 Received: by mail-vk0-x22e.google.com with SMTP id d185so31044146vkg.0 for ; Wed, 15 Jun 2016 07:07:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1465999230-28050-1-git-send-email-clg@kaod.org> References: <1465999230-28050-1-git-send-email-clg@kaod.org> From: Peter Maydell Date: Wed, 15 Jun 2016 15:07:37 +0100 Message-ID: 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: =?UTF-8?Q?C=C3=A9dric_Le_Goater?= Cc: Peter Crosthwaite , Kevin Wolf , Qemu-block , Marcin Krzeminski , QEMU Developers , Max Reitz 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 > --- > +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); Why have you removed the FIXME comment ? thanks -- PMM