patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: stable@dpdk.org, xuemingl@nvidia.com
Subject: [23.11 1/2] log: remove per line log helper
Date: Thu, 12 Dec 2024 14:23:57 +0100	[thread overview]
Message-ID: <20241212132358.602485-1-david.marchand@redhat.com> (raw)

This looks like a rebase/backport issue.
RTE_LOG_LINE is not required in the LTS branch.
Just adapt crypto/dpaa_sec log macro.

Fixes: e56ba1eea617 ("drivers: remove redundant newline from logs")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/checkpatches.sh               |  8 --------
 drivers/crypto/dpaa_sec/dpaa_sec_log.h |  2 +-
 lib/log/rte_log.h                      | 21 ---------------------
 3 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 10d1bf490b..10b79ca2bc 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -53,14 +53,6 @@ print_usage () {
 check_forbidden_additions() { # <patch>
 	res=0
 
-	# refrain from new calls to RTE_LOG
-	awk -v FOLDERS="lib" \
-		-v EXPRESSIONS="RTE_LOG\\\(" \
-		-v RET_ON_FAIL=1 \
-		-v MESSAGE='Prefer RTE_LOG_LINE' \
-		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
-		"$1" || res=1
-
 	# refrain from new additions of rte_panic() and rte_exit()
 	# multiple folders and expressions are separated by spaces
 	awk -v FOLDERS="lib drivers" \
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
index 82ac1fa1c4..d298ac5b57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
@@ -29,7 +29,7 @@ extern int dpaa_logtype_sec;
 
 /* DP Logs, toggled out at compile time if level lower than current level */
 #define DPAA_SEC_DP_LOG(level, fmt, args...) \
-	RTE_LOG_DP_LINE(level, PMD, fmt, ## args)
+	RTE_LOG_DP(level, PMD, fmt "\n", ## args)
 
 #define DPAA_SEC_DP_DEBUG(fmt, args...) \
 	DPAA_SEC_DP_LOG(DEBUG, fmt, ## args)
diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h
index 584cea541e..f7a8405de9 100644
--- a/lib/log/rte_log.h
+++ b/lib/log/rte_log.h
@@ -17,7 +17,6 @@
 extern "C" {
 #endif
 
-#include <assert.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -359,26 +358,6 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
 		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
 	 0)
 
-#if defined(RTE_TOOLCHAIN_GCC) && !defined(PEDANTIC)
-#define RTE_LOG_CHECK_NO_NEWLINE(fmt) \
-	static_assert(!__builtin_strchr(fmt, '\n'), \
-		"This log format string contains a \\n")
-#else
-#define RTE_LOG_CHECK_NO_NEWLINE(...)
-#endif
-
-#define RTE_LOG_LINE(l, t, ...) do { \
-	RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(__VA_ARGS__ ,)); \
-	RTE_LOG(l, t, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
-		RTE_FMT_TAIL(__VA_ARGS__ ,))); \
-} while (0)
-
-#define RTE_LOG_DP_LINE(l, t, ...) do { \
-	RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(__VA_ARGS__ ,)); \
-	RTE_LOG_DP(l, t, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
-		RTE_FMT_TAIL(__VA_ARGS__ ,))); \
-} while (0)
-
 #define RTE_LOG_REGISTER_IMPL(type, name, level)			    \
 int type;								    \
 RTE_INIT(__##type)							    \
-- 
2.47.0


             reply	other threads:[~2024-12-12 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 13:23 David Marchand [this message]
2024-12-12 13:23 ` [23.11 2/2] power: fix log message when checking lcore ID David Marchand
2024-12-12 14:08   ` Xueming Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241212132358.602485-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=stable@dpdk.org \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).