From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C261A45E6F; Wed, 11 Dec 2024 03:08:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DD6E40613; Wed, 11 Dec 2024 03:06:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 34E804042E for <dev@dpdk.org>; Wed, 11 Dec 2024 03:06:18 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id E80A92047230; Tue, 10 Dec 2024 18:06:17 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E80A92047230 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733882777; bh=aeuMy/b050Se1E44FJZbkWzTMvOSufsakvxaMCLRAmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1i+N/a9bOTPmoQeWxeyTUpEJ12RQM3ccWAeu/RCRDGWhJDQgaxSvEOuc0sTieKyD 1YeGHBpSP0innd3VRKbO4kLxarSXaNcEOQhOOkFMjP00TIRvWjCtFWlPFRI6K6Pg8y SWTTOX/eHnZ22WHFireNyBD4SwfuHKdJvqF8yYNE= From: Andre Muezerie <andremue@linux.microsoft.com> To: Maxime Coquelin <maxime.coquelin@redhat.com>, Chenbo Xia <chenbox@nvidia.com> Cc: dev@dpdk.org, Andre Muezerie <andremue@linux.microsoft.com> Subject: [PATCH 21/21] lib/vhost: ensure code structure does not change Date: Tue, 10 Dec 2024 18:05:51 -0800 Message-Id: <1733882751-29598-22-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> References: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Add "do { } while (0)" to macros used to remove logging calls, to ensure there's no code structure change when enabling/disabling logging. Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com> --- lib/vhost/vhost_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index 7caf6d9afa..b5679380f5 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -33,7 +33,7 @@ RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); RTE_LOG_LINE_PREFIX(DEBUG, VHOST_CRYPTO, "%s() line %u: ", \ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__) #else -#define VC_LOG_DBG(...) +#define VC_LOG_DBG(...) do { } while (0) #endif #define VIRTIO_CRYPTO_FEATURES ((1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \ -- 2.47.0.vfs.0.3