From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: ferruh.yigit@amd.com, Junlong Wang <wang.junlong1@zte.com.cn>,
Lijie Shan <shan.lijie@zte.com.cn>
Subject: [PATCH] net/zxdh: remove redundant log prefix
Date: Wed, 6 Nov 2024 10:08:00 +0100 [thread overview]
Message-ID: <20241106090800.817227-1-david.marchand@redhat.com> (raw)
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 <david.marchand@redhat.com>
---
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
next reply other threads:[~2024-11-06 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 9:08 David Marchand [this message]
2024-11-06 9:41 ` Junlong Wang
2024-11-06 10:29 ` [PATCH] " Ferruh Yigit
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=20241106090800.817227-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=shan.lijie@zte.com.cn \
--cc=wang.junlong1@zte.com.cn \
/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).