All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: sleep: use ktime_us_delta in initcall_debug_report()
@ 2021-07-01  0:45 ` Mark-PK Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Mark-PK Tsai @ 2021-07-01  0:45 UTC (permalink / raw)
  To: gregkh
  Cc: matthias.bgg, rjw, pavel, len.brown, linux-pm, linux-kernel,
	linux-arm-kernel, linux-mediatek, mark-pk.tsai, yj.chiang

usecs is no more used after trace_device_pm_report_time replaced
by device_pm_callback_start/end in the below change.

commit e8bca479c3f2 ("PM / sleep: trace events for device PM callbacks")

Use ktime_us_delta to make the debug log more precise instead of
nsecs >> 10.

Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
---
 drivers/base/power/main.c | 5 +----
 1 file changed, 1 insertion(+), 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));
 }
 
 /**
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-01 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  0:45 [PATCH] PM: sleep: use ktime_us_delta in initcall_debug_report() Mark-PK Tsai
2021-07-01  0:45 ` Mark-PK Tsai
2021-07-01  0:45 ` Mark-PK Tsai
2021-07-01 16:45 ` Rafael J. Wysocki
2021-07-01 16:45   ` Rafael J. Wysocki
2021-07-01 16:45   ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.