From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39EDD2DFF04 for ; Thu, 9 Apr 2026 07:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775721327; cv=none; b=tODqlxmFXfO0E0i9X1qpavrD0gTpgKFtMt9MF7QqDlZTdUWXl3ZeJP9coSwmC7JNHN+ekRenhFNzWwQuPj8OMVWODYheeCIYdqr7QVgvjQ5V9/lHvH4jXxa92sIBKPBg0HCXhEzVXfyHUQVSJY/tAXRAHAceb1y72jnjMZNmabA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775721327; c=relaxed/simple; bh=/5ZJ1FafXGgB0BH35EwTR8rcplGlVRfAu4DR25wM9Wo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pSs1edYV+L67eZhRP0hy5p0EwTmu5A0SEqmkExyATcOqryekU91O0+E3UhSW5rdryhfBVAewXWd5GikkRfxBldpvBTt4+znKgaCqGtR7qQrVhQS/dBBGOo2VtgxCUfkdXVhHtJMOGsbtQW/Le+DP9UQH8tjvt8N4zrIaVt6UBUc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=a5cCZARn; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="a5cCZARn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775721327; x=1807257327; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/5ZJ1FafXGgB0BH35EwTR8rcplGlVRfAu4DR25wM9Wo=; b=a5cCZARnwdSBMn2WbeCiw7MEumrBhNDwb44Py5HPqpd6d35VTshO8rbG 2xqduUftiAg6B7BdFf0GB5mLH/Xy5uLGjy1jUuYT+RZC5RDQ38805yb/+ UTf8Lpof1BEf9N2pV5fK5Ry1R9VbeOatcy3Nh/jV0O8pGKH9viaCcQsHe 6gyf1TumF6bDa/DrN86eA4CvfSIgK0uov3IEP9PWq8QPyJGYZFgD618zT GrROCCaSjLtGLS/Wd060hZkuSlVjtSHAMurVo83d/Ijsgl/NmlArkzUge ubm2o/Uj8kO+fEPfMK2NRU320FMmrHkjByQAZDXSiSBXQ1rwkSW2Piw7Z A==; X-CSE-ConnectionGUID: AtLM2dfBRoGu84b/+Al5Qw== X-CSE-MsgGUID: GDTH+74vQIqVJz09FYT8BA== X-IronPort-AV: E=McAfee;i="6800,10657,11753"; a="99346305" X-IronPort-AV: E=Sophos;i="6.23,169,1770624000"; d="scan'208";a="99346305" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2026 00:55:26 -0700 X-CSE-ConnectionGUID: IWD2CF2fTrqWGyKgTGudOg== X-CSE-MsgGUID: BV+lYnXdTIu9DNNXNk9UBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,169,1770624000"; d="scan'208";a="228628765" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by orviesa008.jf.intel.com with ESMTP; 09 Apr 2026 00:55:24 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org, Jacob Keller , Simon Horman , Paul Menzel Subject: [PATCH iwl-next v2] igb: use ktime_get_real helpers in igb_ptp_reset() Date: Thu, 9 Apr 2026 09:55:23 +0200 Message-ID: <20260409075523.3728506-1-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- v1 -> v2 removed the inaccurate claim, + Pauls RB --- drivers/net/ethernet/intel/igb/igb_ptp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c index bd85d02..638d824 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); -- 2.52.0