]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
e1000e: use ktime_get_real_ns() in e1000e_systim_reset()
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Tue, 9 Jun 2026 21:35:49 +0000 (14:35 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jun 2026 23:44:05 +0000 (16:44 -0700)
Replace ktime_to_ns(ktime_get_real()) with the direct equivalent
ktime_get_real_ns() in e1000e_systim_reset().  Using the combined helper
avoids the unnecessary intermediate ktime_t variable and makes the
intent clearer.

Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
Suggested-by: Simon Horman <horms@kernel.org>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Avigail Dahan <avigailx.dahan@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20260609213559.178657-9-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/e1000e/netdev.c

index 5b7ba1594f0d5b1087034cc7844a4c34a4281f81..3bdeb5f0dbeae6994e2d5dc7971822c0c8d0ae5a 100644 (file)
@@ -3943,7 +3943,7 @@ static void e1000e_systim_reset(struct e1000_adapter *adapter)
        /* reset the systim ns time counter */
        spin_lock_irqsave(&adapter->systim_lock, flags);
        timecounter_init(&adapter->tc, &adapter->cc,
-                        ktime_to_ns(ktime_get_real()));
+                        ktime_get_real_ns());
        spin_unlock_irqrestore(&adapter->systim_lock, flags);
 
        /* restore the previous hwtstamp configuration settings */