summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2018-05-21 11:45:52 -0700
committerDavid S. Miller <davem@davemloft.net>2018-05-21 16:17:10 -0400
commitea5ec9fc9eb8bb1eed5ff12dcec328dec918664f (patch)
tree5de5a70d9e7faff01cdb6f5f8909517ac9c958cf /drivers/net/ethernet/ti
parentb4eb7393683d70976a0736b37f1562e8421e3120 (diff)
downloadblackbird-op-linux-ea5ec9fc9eb8bb1eed5ff12dcec328dec918664f.tar.gz
blackbird-op-linux-ea5ec9fc9eb8bb1eed5ff12dcec328dec918664f.zip
net: ethernet: ti: cpts: Fix timestamp print
On 64-bit hosts we will get the following warning: drivers/net/ethernet/ti/cpts.c: In function 'cpts_overflow_check': drivers/net/ethernet/ti/cpts.c:297:11: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type '__kernel_time_t {aka long int}' [-Wformat=] pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec); Fix this by using an appropriate casting that works on all bit sizes. Fixes: a5c79c26e168 ("ptp: cpts: convert to the 64 bit get/set time methods.") Fixes: 87c0e764d43a ("cpts: introduce time stamping code and a PTP hardware clock.") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r--drivers/net/ethernet/ti/cpts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 7842f094f2ef..6f63c8729afc 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -294,7 +294,8 @@ static long cpts_overflow_check(struct ptp_clock_info *ptp)
delay = CPTS_SKB_TX_WORK_TIMEOUT;
spin_unlock_irqrestore(&cpts->lock, flags);
- pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec);
+ pr_debug("cpts overflow check at %lld.%09ld\n",
+ (long long)ts.tv_sec, ts.tv_nsec);
return (long)delay;
}
OpenPOWER on IntegriCloud