Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp814386pxv; Thu, 1 Jul 2021 09:49:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFcpa9Z/hOAKp9UoerxD0IgVfhWWekvshIk+AmTMRdHzESeP0JjMAWW71pGJ5M2kbC4p2H X-Received: by 2002:a17:907:16a9:: with SMTP id hc41mr886107ejc.154.1625158144679; Thu, 01 Jul 2021 09:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625158144; cv=none; d=google.com; s=arc-20160816; b=iEOzKxcWS0NVRUoBi6hlthbdUUVQdwR493bRQxgSadjDq+eBXwe7OIJVlQVgwi9eka /L35GDblT5IzmeskvqucZHoP/Onz4AbbVhg9NXtX0VnLuwXWnHBy16cB97jQogAWB5Jw bCP4phFL1kZSBATw8eZqom5+A0fA8rnRSvS/UG0ALPE5vtYKgodlxkC4XN2Go+Czpei9 D0t9zx09Ued550tyiNETepxVSHHQd9VsUfxNCpqhUcYC5z8EwW86BEcPm0Mw7Ohc9+1v ZcitbSz3aeDRPQ8f5q30EiIPB7NOAGPt4DXfVG6FBhP+mCqJWK1pcLfQYOpUrGGegtN5 NOPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=tg55kCy9BnkaIPndB0hyuKuJD9G9ni7AlPPZSuQ9v3w=; b=YQGwrdUTlq/L/EkohHbL9KAvF5GVI/njSFPR6XR/GIfSXXobON0VvE0vWn0BRpRCFG NwAr1O48HZGRzenB0P45HcQkKxC6QonP/VuKpLrQM4QW/dFSgTnoNMRnKSEhuSZK2Q4K +3qa4UbBeY30cNAZpi7M49gnropY4iUe0MoTtlJkU/u32ZnkBVxhBR728nxBLBd4aMYv al6CT9hx5Ka1uYlenAp5K14mTFLpehXLmViWp2K6chRFKx2l8Vm/bb1j4Sz7xV9c3oKt vp02YX7pgEANALgu+pnMUCGgVQG+0OqnCHcrYWYRPZQNJ0t/z756zIGA6E7jGxxS1ZRn 4QNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si321809ejc.71.2021.07.01.09.48.40; Thu, 01 Jul 2021 09:49:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230021AbhGAQsT (ORCPT + 99 others); Thu, 1 Jul 2021 12:48:19 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:41495 "EHLO mail-ot1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbhGAQsS (ORCPT ); Thu, 1 Jul 2021 12:48:18 -0400 Received: by mail-ot1-f41.google.com with SMTP id m6-20020a9d1d060000b029044e2d8e855eso7132199otm.8; Thu, 01 Jul 2021 09:45:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tg55kCy9BnkaIPndB0hyuKuJD9G9ni7AlPPZSuQ9v3w=; b=uFe1QGQNN+hWCZqMZBI0l9dnXY3+F4ht0UMtQw7UfsTHIXhBhLQQbxcbLIYpegjvD6 pxNu0hz2UfyOk8hpgnDCm9ZD8PSCk3hro/s5U0+cm0j5iPG1qoXbLguQZo3dQAJiHqny 4RkuXw3gMOtRYuMJnL1AJbO4CDN0xkCXYI0zoxXTAFrEYTZubv18CXr4ef1WUr1d0ggy V/w+kamiLtqbpyL0H9Z8lkP/BLzYMr8czJyV2kbql5+/0wtLwbXgyTD1Is9/X21wu1wQ i5GOaeZ7uRgcnCPQYEWPwmsgrnSLw6PTCDtjmcsND0rkVTl+Iqi9ryBpizl2YcnBW4bU qq4g== X-Gm-Message-State: AOAM533vkw0EooG9faXX6pxkwZ31NjT16zi1xni+CrpDOnd7eLYpvQO8 kAnwHHvZeUhFp79Sgr2MtOPMribOOJvnVGF4KyU= X-Received: by 2002:a9d:674b:: with SMTP id w11mr775865otm.260.1625157947244; Thu, 01 Jul 2021 09:45:47 -0700 (PDT) MIME-Version: 1.0 References: <20210701004538.23483-1-mark-pk.tsai@mediatek.com> In-Reply-To: <20210701004538.23483-1-mark-pk.tsai@mediatek.com> From: "Rafael J. Wysocki" Date: Thu, 1 Jul 2021 18:45:36 +0200 Message-ID: Subject: Re: [PATCH] PM: sleep: use ktime_us_delta in initcall_debug_report() To: Mark-PK Tsai Cc: Greg Kroah-Hartman , Matthias Brugger , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Linux PM , Linux Kernel Mailing List , Linux ARM , "moderated list:ARM/Mediatek SoC..." , yj.chiang@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 1, 2021 at 2:45 AM Mark-PK Tsai 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 > --- > 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!