DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	stable@dpdk.org, Gagandeep Singh <g.singh@nxp.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [PATCH 3/7] crypto/caam_jr: fix descriptor dump build
Date: Fri,  4 Sep 2026 12:12:38 -0700	[thread overview]
Message-ID: <20260904191652.2399074-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20260904191652.2399074-1-stephen@networkplumber.org>

SEC_DUMP_DESC() grew a FILE * argument when the NXP drivers were
converted to fprintf(), but the only caller was never updated, so
building with RTE_LIBRTE_PMD_CAAM_JR_DEBUG failed with a macro
arity error.

Compiling the macro body for the first time then exposed two
further problems in it: the log format string ended in a newline,
which RTE_LOG_LINE() rejects, and descriptor pointers were cast to uint32_t,
truncating them on 64-bit builds.

Fixes: a8794e398279 ("drivers: use fprintf for debug dumps in NXP drivers")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/caam_jr/caam_jr.c      | 2 +-
 drivers/crypto/caam_jr/caam_jr_desc.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index a57dc56b80..104ce52d11 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -462,7 +462,7 @@ caam_jr_prep_cdb(struct caam_jr_session *ses)
 	}
 
 #if CAAM_JR_DBG
-	SEC_DUMP_DESC(cdb->sh_desc);
+	SEC_DUMP_DESC(cdb->sh_desc, stdout);
 #endif
 
 	cdb->sh_hdr.hi.field.idlen = shared_desc_len;
diff --git a/drivers/crypto/caam_jr/caam_jr_desc.h b/drivers/crypto/caam_jr/caam_jr_desc.h
index eb4e68578a..845facec26 100644
--- a/drivers/crypto/caam_jr/caam_jr_desc.h
+++ b/drivers/crypto/caam_jr/caam_jr_desc.h
@@ -112,12 +112,12 @@
 /* Helper macro for dumping the hex representation of a descriptor */
 #define SEC_DUMP_DESC(descriptor, f) {					\
 	int __i;							\
-	CAAM_JR_INFO("Des@ 0x%08x\n", (uint32_t)((uint32_t *)(descriptor)));\
+	CAAM_JR_INFO("Des@ %p", (const void *)(descriptor));		\
 	for (__i = 0;						\
 		__i < SEC_GET_DESC_LEN(descriptor);			\
 		__i++) {						\
-		fprintf(f, "0x%08x: 0x%08x\n",			\
-			(uint32_t)(((uint32_t *)(descriptor)) + __i),	\
+		fprintf(f, "%p: 0x%08x\n",			\
+			(const void *)(((uint32_t *)(descriptor)) + __i), \
 			*(((uint32_t *)(descriptor)) + __i));		\
 	}								\
 }
-- 
2.53.0


  parent reply	other threads:[~2026-09-04 19:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 19:12 [PATCH 0/7] fix XXX_DEBUG warnings Stephen Hemminger
2026-09-04 19:12 ` [PATCH 1/7] bus/fslmc: fix build of qbman debug code Stephen Hemminger
2026-09-10 16:51   ` hemant.agrawal
2026-09-04 19:12 ` [PATCH 2/7] bus/fslmc: fix signed comparison in buffer acquire Stephen Hemminger
2026-09-04 19:12 ` Stephen Hemminger [this message]
2026-09-04 19:12 ` [PATCH 4/7] crypto/ipsec_mb: fix missing header for debug build Stephen Hemminger
2026-09-04 19:12 ` [PATCH 5/7] power/amd_uncore: fix debug log build Stephen Hemminger
2026-09-04 19:12 ` [PATCH 6/7] net/rnp: fix register debug log format Stephen Hemminger
2026-09-04 19:12 ` [PATCH 7/7] net/vmxnet3: remove unused queue dump functions Stephen Hemminger

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=20260904191652.2399074-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=stable@dpdk.org \
    /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