From 7ab3aec60239f35be45069b354b4502ea28a3120 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Thu, 31 Oct 2019 00:01:42 +0530 Subject: [PATCH] net/octeontx2: fix 32-bit build x86_x32 compilation failing due to incorrect format specifiers in logs. Fixes: a78b9246723b ("net/octeontx2: add remaining PTP operations") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Reviewed-by: Gavin Hu Acked-by: Jerin Jacob --- drivers/net/octeontx2/otx2_ptp.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c index fd13c26785..160d7c9aba 100644 --- a/drivers/net/octeontx2/otx2_ptp.c +++ b/drivers/net/octeontx2/otx2_ptp.c @@ -259,9 +259,9 @@ otx2_nix_timesync_read_rx_timestamp(struct rte_eth_dev *eth_dev, *timestamp = rte_ns_to_timespec(ns); tstamp->rx_ready = 0; - otx2_nix_dbg("rx timestamp: %llu sec: %lu nsec %lu", - (unsigned long long)tstamp->rx_tstamp, timestamp->tv_sec, - timestamp->tv_nsec); + otx2_nix_dbg("rx timestamp: %"PRIu64" sec: %"PRIu64" nsec %"PRIu64"", + (uint64_t)tstamp->rx_tstamp, (uint64_t)timestamp->tv_sec, + (uint64_t)timestamp->tv_nsec); return 0; } @@ -280,9 +280,9 @@ otx2_nix_timesync_read_tx_timestamp(struct rte_eth_dev *eth_dev, ns = rte_timecounter_update(&dev->tx_tstamp_tc, *tstamp->tx_tstamp); *timestamp = rte_ns_to_timespec(ns); - otx2_nix_dbg("tx timestamp: %llu sec: %lu nsec %lu", - *(unsigned long long *)tstamp->tx_tstamp, - timestamp->tv_sec, timestamp->tv_nsec); + otx2_nix_dbg("tx timestamp: %"PRIu64" sec: %"PRIu64" nsec %"PRIu64"", + *tstamp->tx_tstamp, (uint64_t)timestamp->tv_sec, + (uint64_t)timestamp->tv_nsec); *tstamp->tx_tstamp = 0; rte_wmb(); @@ -358,7 +358,8 @@ otx2_nix_timesync_read_time(struct rte_eth_dev *eth_dev, struct timespec *ts) ns = rte_timecounter_update(&dev->systime_tc, rsp->clk); *ts = rte_ns_to_timespec(ns); - otx2_nix_dbg("PTP time read: %ld.%09ld", ts->tv_sec, ts->tv_nsec); + otx2_nix_dbg("PTP time read: %"PRIu64" .%09"PRIu64"", + (uint64_t)ts->tv_sec, (uint64_t)ts->tv_nsec); return 0; } -- 2.20.1