From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B781E45E79; Wed, 11 Dec 2024 17:16:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A41840267; Wed, 11 Dec 2024 17:16:10 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C300F400D7 for ; Wed, 11 Dec 2024 17:16:08 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D8DBB204723B; Wed, 11 Dec 2024 08:16:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D8DBB204723B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733933767; bh=TTbZD5/r2VaT2TE/tlTIu7i8THgdZQyRriG2xMcB47s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CdXYF3hWfFsd7a520Zq6UzR6GQaMWg29aznBZ8QYHlE+ZXpamBkpRRxANCKIolJMO vFk4WMvfUSTV2jQLDSAwaYC4SbcUqd98L3FtE7zv7D73TZLWX3LtwnIJaYYutgoSjq 7EzeARg40uxwxQ0FCvXCxtF/iVuvaVTN+Lm1wZcE= Date: Wed, 11 Dec 2024 08:16:07 -0800 From: Andre Muezerie To: Stephen Hemminger Cc: dev@dpdk.org Subject: Re: [PATCH 16/21] lib/log: ensure code structure does not change Message-ID: <20241211161607.GA9134@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> <1733882751-29598-17-git-send-email-andremue@linux.microsoft.com> <20241210191321.32919f26@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241210191321.32919f26@hermes.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Dec 10, 2024 at 07:13:21PM -0800, Stephen Hemminger wrote: > On Tue, 10 Dec 2024 18:05:46 -0800 > Andre Muezerie wrote: > > > 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 > > --- > > lib/log/rte_log.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h > > index 3735137150..6b00caab88 100644 > > --- a/lib/log/rte_log.h > > +++ b/lib/log/rte_log.h > > @@ -364,7 +364,7 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) > > static_assert(!__builtin_strchr(fmt, '\n'), \ > > "This log format string contains a \\n") > > #else > > -#define RTE_LOG_CHECK_NO_NEWLINE(...) > > +#define RTE_LOG_CHECK_NO_NEWLINE(...) do { } while (0) > > #endif > > > > /** > > NAK > this is a change since static_assert() can be put anywhere like outside > of code blocks. This patch is not needed. Understood. I'll remove these changes from the series then.