From 324ebbfcb947c7bfb462f94f80225aeb9bf01251 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Tue, 6 Oct 2020 12:20:36 -0400 Subject: [PATCH] log: remove SPDK_ERRLOGDUMP This macro was used in only single place and served no real purpose. spdk_log_dump() is more commonly used directly, so use it. Signed-off-by: Tomasz Zawadzki Change-Id: Idea720cdee767c7c6cdc30db10003ef42b88c4a3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4540 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Reviewed-by: Mellanox Build Bot --- include/spdk_internal/log.h | 7 ------- lib/iscsi/iscsi.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/spdk_internal/log.h b/include/spdk_internal/log.h index 0e3cc49ad..e77d94a6c 100644 --- a/include/spdk_internal/log.h +++ b/include/spdk_internal/log.h @@ -41,11 +41,4 @@ #include "spdk/log.h" -#define SPDK_ERRLOGDUMP(LABEL, BUF, LEN) \ - do { \ - if ((LEN)) { \ - spdk_log_dump(stderr, (LABEL), (BUF), (LEN)); \ - } \ - } while (0) - #endif /* SPDK_INTERNAL_LOG_H */ diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 5f9c5b3e7..e8961bfe2 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -4322,7 +4322,7 @@ init_login_reject_response(struct spdk_iscsi_pdu *pdu, struct spdk_iscsi_pdu *rs static void iscsi_pdu_dump(struct spdk_iscsi_pdu *pdu) { - SPDK_ERRLOGDUMP("PDU", (uint8_t *)&pdu->bhs, ISCSI_BHS_LEN); + spdk_log_dump(stderr, "PDU", (uint8_t *)&pdu->bhs, ISCSI_BHS_LEN); } /* This function is used to refree the pdu when it is acknowledged */