From: Aleksandr Loktionov Date: Tue, 9 Jun 2026 21:35:48 +0000 (-0700) Subject: igb: use ktime_get_real helpers in igb_ptp_reset() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2040b8ba371bf970ef29b99b1e971f9b0e6bdc1a;p=thirdparty%2Flinux.git igb: use ktime_get_real helpers in igb_ptp_reset() Replace ktime_to_ns(ktime_get_real()) with the direct equivalent ktime_get_real_ns() and ktime_to_timespec64(ktime_get_real()) with ktime_get_real_ts64() in igb_ptp_reset(). Using the combined helpers makes the intent clearer. Suggested-by: Jacob Keller Suggested-by: Simon Horman Reviewed-by: Paul Menzel Signed-off-by: Aleksandr Loktionov Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20260609213559.178657-8-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c index bd85d02ecadd..638d8242b66b 100644 --- a/drivers/net/ethernet/intel/igb/igb_ptp.c +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c @@ -1500,12 +1500,13 @@ void igb_ptp_reset(struct igb_adapter *adapter) /* Re-initialize the timer. */ if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) { - struct timespec64 ts = ktime_to_timespec64(ktime_get_real()); + struct timespec64 ts; + ktime_get_real_ts64(&ts); igb_ptp_write_i210(adapter, &ts); } else { timecounter_init(&adapter->tc, &adapter->cc, - ktime_to_ns(ktime_get_real())); + ktime_get_real_ns()); } out: spin_unlock_irqrestore(&adapter->tmreg_lock, flags);