On Sun, Mar 29, 2015 at 11:12:00PM +0200, Richard Cochran wrote:
quoted hunk ↗ jump to hunk
@@ -171,11 +171,11 @@ static void e1000e_systim_overflow_work(struct work_struct *work)
struct e1000_adapter *adapter = container_of(work, struct e1000_adapter,
systim_overflow_work.work);
struct e1000_hw *hw = &adapter->hw;
- struct timespec ts;
+ struct timespec64 ts;
- adapter->ptp_clock_info.gettime(&adapter->ptp_clock_info, &ts);
+ adapter->ptp_clock_info.gettime64(&adapter->ptp_clock_info, &ts);
- e_dbg("SYSTIM overflow check at %ld.%09lu\n", ts.tv_sec, ts.tv_nsec);
+ e_dbg("SYSTIM overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec);
On a 64 bit build, this triggers a new warning.
drivers/net/ethernet/intel/e1000e/ptp.c: In function ‘e1000e_systim_overflow_work’:
drivers/net/ethernet/intel/e1000e/ptp.c:176:2: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘__kernel_time_t’ [-Wformat]
On 32 bit, timespec64.tv_sec is of type 'time64_t' or '__s64'.
On 64 bit, timespec64.tv_sec is of type '__kernel_time_t' or
'__kernel_long_t' or 'long'.
How are we supposed to print that field? With a cast?
Thanks,
Richard