[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gtWRpbpL82Nh9VpkXQfOqMXAC08nNmEovHq_=xdwN=mA@mail.gmail.com>
Date: Thu, 1 Jul 2021 18:45:36 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Mark-PK Tsai <mark-pk.tsai@...iatek.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Matthias Brugger <matthias.bgg@...il.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
Linux PM <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC..."
<linux-mediatek@...ts.infradead.org>, yj.chiang@...iatek.com
Subject: Re: [PATCH] PM: sleep: use ktime_us_delta in initcall_debug_report()
On Thu, Jul 1, 2021 at 2:45 AM Mark-PK Tsai <mark-pk.tsai@...iatek.com> wrote:
>
> 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@...iatek.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));
> }
>
> /**
> --
Applied as 5.14-rc1 material with some edits in the subject and
changelog, thanks!
Powered by blists - more mailing lists