From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD1ex-00065T-C5 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 23:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD1ew-0002pU-CD for qemu-devel@nongnu.org; Tue, 14 Jun 2016 23:38:31 -0400 Date: Wed, 15 Jun 2016 13:10:30 +1000 From: David Gibson Message-ID: <20160615031030.GE4882@voom.fritz.box> References: <1465924983-30470-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZvvH1QDaOFG4lOZN" Content-Disposition: inline In-Reply-To: <1465924983-30470-1-git-send-email-thuth@redhat.com> Subject: Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Silence deprecation message in qtest mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de, Alexey Kardashevskiy --ZvvH1QDaOFG4lOZN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 14, 2016 at 07:23:03PM +0200, Thomas Huth wrote: > When running "make check", there is currently always an error message > saying "spapr-pci-vfio-host-bridge is deprecated". This happens because > the QOM tests are instantiating all possible devices, and the error > message is currently located in the instance_init() function of the > device. Since it is legal for the tests to instantiate a device without > using it, the error message should be silenced when we're running in > test mode. >=20 > Signed-off-by: Thomas Huth Applied to ppc-for-2.7, thanks. > --- > hw/ppc/spapr_pci_vfio.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c > index cbd3d23..f3cb141 100644 > --- a/hw/ppc/spapr_pci_vfio.c > +++ b/hw/ppc/spapr_pci_vfio.c > @@ -27,6 +27,7 @@ > #include "linux/vfio.h" > #include "hw/vfio/vfio.h" > #include "qemu/error-report.h" > +#include "sysemu/qtest.h" > =20 > #define TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE "spapr-pci-vfio-host-bridge" > =20 > @@ -48,7 +49,9 @@ static Property spapr_phb_vfio_properties[] =3D { > =20 > static void spapr_phb_vfio_instance_init(Object *obj) > { > - error_report("spapr-pci-vfio-host-bridge is deprecated"); > + if (!qtest_enabled()) { > + error_report("spapr-pci-vfio-host-bridge is deprecated"); > + } > } > =20 > bool spapr_phb_eeh_available(sPAPRPHBState *sphb) --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --ZvvH1QDaOFG4lOZN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXYMcmAAoJEGw4ysog2bOSQJcP/R5mUsL6AfmKO7kGafCjgNFq OSx4JzfwbVQt1UBqa2FhViwIZa6jCzY8ZvnPW+btP9skSeLPio98ZdZ0K53Z7O/W u7qsRRiln1Z31mRovTyUGcyOg1m5zYRa/sLvAc3SIgiT2KZGbfuGl/+Gg8a62fP+ qGc2MXOnf1p7W2w9EQfBHf4dr9aHEy/KSDL0jaw6XrCzppp53Ao+e90N/VLn6Tat lkCzxHgZzRWkR+4QwtC8UghRxduuXlJWK5GaUQO+lf36L3jJFe2qVPf1SKw1nVdZ GuxBQHEMe9X01UL2rxB4IQXdmrHIhwlOQkAEcmmsjPvaJXIzBI697vYt5MgGxg2w IepITRa9OoR+cky8k77clktQIbb0LuZHmxRgkaJ2WY+jgpezD+AdgmRmW6u2SRNs vQr+dXQaGbXeNItOgFIvHwknlTghYgycwzOHRNX+riNZBko4mxOUCA7IiX0W6w1O EQNDLU+TeXVGXxS8QFJ2uE5QlPZGckDY9YO6PJrHb7KKMoq+rtdzkmXuWYHqFJRS feBF7RS6lPnGf4LNI/4KnYRYht8b899t4qUiuCFaDmt5NicByrr6yoLLprnlm6f0 UkF02KLr0xXYQ7Y9+dokFhmmR0v+l+OycRgFm7dRr1AONLIlbiERUNOH4koz06xl ObqgH0b8PvVuOj+X0SGm =lmpP -----END PGP SIGNATURE----- --ZvvH1QDaOFG4lOZN--