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 E55E745C93; Wed, 6 Nov 2024 10:08:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78400427A9; Wed, 6 Nov 2024 10:08:28 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8E81640265 for ; Wed, 6 Nov 2024 10:08:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730884106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5s/aqUF4exQtG5kjAuH00dKlMmI3kZJhEPwR/ev0Ya4=; b=AONVVseVjrB2Ul9ItBoq3u0ae3uHuAlSZnhTanukwVT118FD2bfdvqWPN/e1rSV3ioPiaG GUrfqUxRej3ABrEpSm/6s3mrVGLWlIJO9QdnExZt0QTu7ElBdlnFQVDClBT2Smetg5WRph ZslV7D0l7NuRjoPFnaB+k5EzmA23014= Received: from mx-prod-mc-03.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-192-Yfk2eGr5N02Im5390Ou4pA-1; Wed, 06 Nov 2024 04:08:22 -0500 X-MC-Unique: Yfk2eGr5N02Im5390Ou4pA-1 X-Mimecast-MFC-AGG-ID: Yfk2eGr5N02Im5390Ou4pA Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3B1AF1955E7D; Wed, 6 Nov 2024 09:08:21 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.57]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DFCC319560AA; Wed, 6 Nov 2024 09:08:18 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Junlong Wang , Lijie Shan Subject: [PATCH] net/zxdh: remove redundant log prefix Date: Wed, 6 Nov 2024 10:08:00 +0100 Message-ID: <20241106090800.817227-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: F_V8kGYzm28fcfVHbY8RlPsmG05tTqpG2NTMe1q5pNM_1730884101 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 By using RTE_LOG*() macros, the log messages are prefixed by the logtype. RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "zxdh rx %s(): ", ... will emit messages like "ZXDH_RX: zxdh rx %s(): ...\n" There is no need to add a prefix repeating the same information. Signed-off-by: David Marchand --- Note: this is not a big issue, but can this be squashed in relevant commit in next-net before reaching main? Thanks. --- drivers/net/zxdh/zxdh_logs.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/zxdh/zxdh_logs.h b/drivers/net/zxdh/zxdh_logs.h index 53838e313b..ad864a2089 100644 --- a/drivers/net/zxdh/zxdh_logs.h +++ b/drivers/net/zxdh/zxdh_logs.h @@ -10,25 +10,21 @@ extern int zxdh_logtype_driver; #define RTE_LOGTYPE_ZXDH_DRIVER zxdh_logtype_driver #define PMD_DRV_LOG(level, ...) \ - RTE_LOG_LINE_PREFIX(level, ZXDH_DRIVER, "zxdh %s(): ", \ - __func__, __VA_ARGS__) + RTE_LOG_LINE_PREFIX(level, ZXDH_DRIVER, "%s(): ", __func__, __VA_ARGS__) extern int zxdh_logtype_rx; #define RTE_LOGTYPE_ZXDH_RX zxdh_logtype_rx #define PMD_RX_LOG(level, ...) \ - RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "zxdh rx %s(): ", \ - __func__, __VA_ARGS__) + RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "%s(): ", __func__, __VA_ARGS__) extern int zxdh_logtype_tx; #define RTE_LOGTYPE_ZXDH_TX zxdh_logtype_tx #define PMD_TX_LOG(level, ...) \ - RTE_LOG_LINE_PREFIX(level, ZXDH_TX, "zxdh tx %s(): ", \ - __func__, __VA_ARGS__) + RTE_LOG_LINE_PREFIX(level, ZXDH_TX, "%s(): ", __func__, __VA_ARGS__) extern int zxdh_logtype_msg; #define RTE_LOGTYPE_ZXDH_MSG zxdh_logtype_msg #define PMD_MSG_LOG(level, ...) \ - RTE_LOG_LINE_PREFIX(level, ZXDH_MSG, "zxdh msg %s(): ", \ - __func__, __VA_ARGS__) + RTE_LOG_LINE_PREFIX(level, ZXDH_MSG, "%s(): ", __func__, __VA_ARGS__) #endif /* ZXDH_LOGS_H */ -- 2.47.0