]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpts: Fix timestamp print
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 21 May 2018 18:45:52 +0000 (11:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 May 2018 20:17:10 +0000 (16:17 -0400)
commitd32c567efb8d6882cf227d192a9a3b85a9f0927d
tree5de5a70d9e7faff01cdb6f5f8909517ac9c958cf
parentf63d3298f0a7419f7848bc8e7cb4d1588f4fef2c
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: 374c3e9b43db ("ptp: cpts: convert to the 64 bit get/set time methods.")
Fixes: a690156c7c35 ("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>
drivers/net/ethernet/ti/cpts.c