From patchwork Fri Jun 17 06:36:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 636797 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rW9Wy0HK7z9t1r for ; Fri, 17 Jun 2016 16:36:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b=Ru3zmVvv; dkim-atps=neutral Received: from localhost ([::1]:54200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDnOV-0006mR-Rt for incoming@patchwork.ozlabs.org; Fri, 17 Jun 2016 02:36:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDnMz-0005XZ-9B for qemu-devel@nongnu.org; Fri, 17 Jun 2016 02:35:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDnMw-0008BL-7T for qemu-devel@nongnu.org; Fri, 17 Jun 2016 02:35:07 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:37514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDnMv-00088o-TD; Fri, 17 Jun 2016 02:35:06 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3rW9Ts1YYsz9t1v; Fri, 17 Jun 2016 16:34:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1466145297; bh=CFCZZ+5CJBQhF8C3PDj0PtzaLIBGsGKbV+jsP/5efYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ru3zmVvvPV4wB/Sdz0C3CxkzqRAtUFLuBK/JESeacQwhwPKk7wCes3HERhmUNNTrk mVKug3uzJ3chIdCAJLZ69xgMdw9uK/eNVX/HsWlMa0HAW8Gvnh4VbfCJdRypdhrmxI sv1Ab4dIgBSd99hHEWGxG7bp+EneIBSttIWlbBbg= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 17 Jun 2016 16:36:22 +1000 Message-Id: <1466145399-32209-2-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466145399-32209-1-git-send-email-david@gibson.dropbear.id.au> References: <1466145399-32209-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 01/18] hw/ppc/spapr: Silence deprecation message in qtest mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, aik@ozlabs.ru, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, Thomas Huth , imammedo@redhat.com, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth 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. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/spapr_pci_vfio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" #define TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE "spapr-pci-vfio-host-bridge" @@ -48,7 +49,9 @@ static Property spapr_phb_vfio_properties[] = { 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"); + } } bool spapr_phb_eeh_available(sPAPRPHBState *sphb)