summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/timers/raw_skew.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-18 08:56:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-18 08:56:02 -0700
commit74f1456c4a5f3d7da4102ecae5c20370f89c6ed1 (patch)
tree42dd7f4a820c6220180447ec9f782a4a47e3d6bc /tools/testing/selftests/timers/raw_skew.c
parentf2f393c385af0635eddb58df8bcd645cb6a18f5d (diff)
parent569f8b501b177f21121d483a96491716ab8905f4 (diff)
Merge tag 'linux-kselftest-fixes-6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest fixes from Shuah Khan: "Fixes to bugs that are interfering with arm64 and risc workflows. Also two fixes to timer and mincore tests that are causing test failures" * tag 'linux-kselftest-fixes-6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/arm64: fix build failure during the "emit_tests" step selftests/riscv: fix potential build failure during the "emit_tests" step tools: timers: fix freq average calculation selftests/mincore: fix skip condition for check_huge_pages test
Diffstat (limited to 'tools/testing/selftests/timers/raw_skew.c')
-rw-r--r--tools/testing/selftests/timers/raw_skew.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/timers/raw_skew.c b/tools/testing/selftests/timers/raw_skew.c
index 5beceeed0d11..6eba203f9da7 100644
--- a/tools/testing/selftests/timers/raw_skew.c
+++ b/tools/testing/selftests/timers/raw_skew.c
@@ -129,8 +129,7 @@ int main(int argc, char **argv)
printf("%lld.%i(est)", eppm/1000, abs((int)(eppm%1000)));
/* Avg the two actual freq samples adjtimex gave us */
- ppm = (tx1.freq + tx2.freq) * 1000 / 2;
- ppm = (long long)tx1.freq * 1000;
+ ppm = (long long)(tx1.freq + tx2.freq) * 1000 / 2;
ppm = shift_right(ppm, 16);
printf(" %lld.%i(act)", ppm/1000, abs((int)(ppm%1000)));