clocksource: Handle negative skews in "skew is too large" messages
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 7 Jun 2023 18:59:49 +0000 (11:59 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 14 Jul 2023 22:17:09 +0000 (15:17 -0700)
commite40806e9bcf8aaa86dbf0d484e7cf3cfa09cb86c
tree3fa226db7247505724ef7d64de6c1684b37aa8f7
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
clocksource: Handle negative skews in "skew is too large" messages

The nanosecond-to-millisecond skew computation uses unsigned arithmetic,
which produces user-unfriendly large positive numbers for negative skews.
Therefore, use signed arithmetic for this computation in order to preserve
the negativity.

Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Reported-by: Feng Tang <feng.tang@intel.com>
Fixes: dd029269947a ("clocksource: Improve "skew is too large" messages")
Reviewed-by: Feng Tang <feng.tang@intel.com>
Tested-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/time/clocksource.c