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 175F145E85 for ; Thu, 12 Dec 2024 14:24:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49DA940269; Thu, 12 Dec 2024 14:24:10 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8A33C40269 for ; Thu, 12 Dec 2024 14:24:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734009848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fzsypoDwo04WJp14KDBGemDSWnho+TONJD06ihBUdtc=; b=QRDmKG4POvLoimAesmxCEfHsj3fvq60+vVOQnMAdSgdLzlC4mXYP+qVQNqkkEteIuX/taZ MhAPFF3YOwvzaYbxsYIJ2+Dq0rZ4GJfNIkjb8idrCZVENb+KHmK/1vv3bCQYOMvjEv54L8 M4ZU6GEjLS3eswYa+NVRlmof/cfNQ+8= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-43-mPFNRjyzNLaUxkl7HmVdtg-1; Thu, 12 Dec 2024 08:24:06 -0500 X-MC-Unique: mPFNRjyzNLaUxkl7HmVdtg-1 X-Mimecast-MFC-AGG-ID: mPFNRjyzNLaUxkl7HmVdtg Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AF8571956088; Thu, 12 Dec 2024 13:24:05 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.129]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AC3E9300FA99; Thu, 12 Dec 2024 13:24:04 +0000 (UTC) From: David Marchand 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 Message-ID: <20241212132358.602485-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: r2FkPkPNdzBV1yJA1jAKU6rRLlk-z5yde3EPi0w1EPk_1734009846 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 --- 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() { # 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 #include #include #include @@ -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