diff options
author | Mark-PK Tsai <mark-pk.tsai@mediatek.com> | 2021-07-01 08:45:38 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-07-01 18:44:02 +0200 |
commit | 75674eb06a28816af2a7331dcee4088cc1ab5f6d (patch) | |
tree | 8fb4b9a60e5320443fe4bd7d61a1764ddacbba42 /drivers/base | |
parent | 3563f55ce65462063543dfa6a8d8c7fbfb9d7772 (diff) |
PM: sleep: Use ktime_us_delta() in initcall_debug_report()
Use ktime_us_delta() to make the debug log more precise instead of
shifting the return value of ktime_to_ns() applied to a ktime_sub()
result by 10 bit positions to the right.
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
[ rjw: Changelog rewrite, subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index f893c3c5af07..d568772152c2 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -220,16 +220,13 @@ static void initcall_debug_report(struct device *dev, ktime_t calltime, void *cb, int error) { ktime_t rettime; - s64 nsecs; if (!pm_print_times_enabled) return; rettime = ktime_get(); - nsecs = (s64) ktime_to_ns(ktime_sub(rettime, calltime)); - dev_info(dev, "%pS returned %d after %Ld usecs\n", cb, error, - (unsigned long long)nsecs >> 10); + (unsigned long long)ktime_us_delta(rettime, calltime)); } /** |