]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drivers: perf: use us_to_ktime() where appropriate
authorXichao Zhao <zhao.xichao@vivo.com>
Wed, 13 Aug 2025 08:32:57 +0000 (16:32 +0800)
committerWill Deacon <will@kernel.org>
Thu, 18 Sep 2025 12:48:20 +0000 (13:48 +0100)
The arm_ccn_pmu_poll_period_us are more suitable for using
the us_to_ktime(). This can make the code more concise and
enhance readability.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-ccn.c

index 1a0d0e1a226334b79b853970b74c1a1086465713..8af3563fdf60a3311fd26ff9c97b90f4b8e9bf8f 100644 (file)
@@ -565,7 +565,7 @@ module_param_named(pmu_poll_period_us, arm_ccn_pmu_poll_period_us, uint,
 
 static ktime_t arm_ccn_pmu_timer_period(void)
 {
-       return ns_to_ktime((u64)arm_ccn_pmu_poll_period_us * 1000);
+       return us_to_ktime((u64)arm_ccn_pmu_poll_period_us);
 }