The register offset is a size_t but was printed with %p, producing a
-Wformat warning at every call site (22 in a full build) when
RTE_LIBRTE_RNP_REG_DEBUG is enabled. Print it with %zx instead.
Fixes: 18d555f74fcf ("net/rnp: add mailbox basic operations")
Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]>
---
drivers/net/rnp/base/rnp_osdep.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/rnp/base/rnp_osdep.h b/drivers/net/rnp/base/rnp_osdep.h
index 58dcb40f90..a95a37f2fe 100644
--- a/drivers/net/rnp/base/rnp_osdep.h
+++ b/drivers/net/rnp/base/rnp_osdep.h
@@ -90,14 +90,14 @@ rnp_reg_read32(const void *base, size_t offset)
{
u32 v = rte_read32(((const u8 *)base + offset));
- RNP_PMD_REG_LOG(DEBUG, "offset=%p val=%#"PRIx32"", offset, v);
+ RNP_PMD_REG_LOG(DEBUG, "offset=%#zx val=%#"PRIx32"", offset, v);
return v;
}
static inline void
rnp_reg_write32(volatile void *base, size_t offset, u32 val)
{
- RNP_PMD_REG_LOG(DEBUG, "offset=%p val=%#"PRIx32"", offset, val);
+ RNP_PMD_REG_LOG(DEBUG, "offset=%#zx val=%#"PRIx32"", offset, val);
rte_write32(val, ((volatile u8 *)base + offset));
}
--
2.53.0