From patchwork Fri Mar 18 17:00:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 599565 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 3qRWk85kHYz9sBM for ; Sat, 19 Mar 2016 04:02:40 +1100 (AEDT) Received: from localhost ([::1]:45025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agxnK-0000CC-Oj for incoming@patchwork.ozlabs.org; Fri, 18 Mar 2016 13:02:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agxmI-0006VS-5u for qemu-devel@nongnu.org; Fri, 18 Mar 2016 13:01:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agxmG-00083r-S4 for qemu-devel@nongnu.org; Fri, 18 Mar 2016 13:01:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agxmG-00083a-ND for qemu-devel@nongnu.org; Fri, 18 Mar 2016 13:01:32 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 4C1E11E2A for ; Fri, 18 Mar 2016 17:01:32 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2IH1U0S006589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 18 Mar 2016 13:01:31 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id F1BE1300253E; Fri, 18 Mar 2016 18:01:27 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 18 Mar 2016 18:00:59 +0100 Message-Id: <1458320487-19603-13-git-send-email-armbru@redhat.com> In-Reply-To: <1458320487-19603-1-git-send-email-armbru@redhat.com> References: <1458320487-19603-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 12/40] ivshmem: Compile debug prints unconditionally to prevent bit-rot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau Message-Id: <1458066895-20632-13-git-send-email-armbru@redhat.com> --- hw/misc/ivshmem.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 11cbc03..6ac8c0d 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -48,13 +48,13 @@ #define IVSHMEM_REG_BAR_SIZE 0x100 -//#define DEBUG_IVSHMEM -#ifdef DEBUG_IVSHMEM -#define IVSHMEM_DPRINTF(fmt, ...) \ - do {printf("IVSHMEM: " fmt, ## __VA_ARGS__); } while (0) -#else -#define IVSHMEM_DPRINTF(fmt, ...) -#endif +#define IVSHMEM_DEBUG 0 +#define IVSHMEM_DPRINTF(fmt, ...) \ + do { \ + if (IVSHMEM_DEBUG) { \ + printf("IVSHMEM: " fmt, ## __VA_ARGS__); \ + } \ + } while (0) #define TYPE_IVSHMEM "ivshmem" #define IVSHMEM(obj) \