Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp165643pxv; Wed, 30 Jun 2021 17:47:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr9M+o8Ir7Zh0qw7hODDMBBkX7JKyAN9/sRlIGm1+4/A0WfTsLlruLlgm8DPo/GCyXmokc X-Received: by 2002:a17:906:b0d4:: with SMTP id bk20mr34433355ejb.535.1625100447642; Wed, 30 Jun 2021 17:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625100447; cv=none; d=google.com; s=arc-20160816; b=bmG36GqigFacFdsLra1bC+Tr0kFHssee0E+xbOpj63lSIwikY1y6mOhmY9od3kA4au u03ySCqGr8uXmGT1fgbDGl72J1WsI35D9eDWJ4w+SjMLwmNcjKsQRNQ2ptM6vKRG8OoF 2mrXtNip/9fPlkJf3plNfJmwtISZUrpDgWOOf9s27V48LyqRNOa4IDnxThOP24GfsljY /NN0GFVwF3tqzv00lcQRNP6riBY82DkBNL+Q/gZN5N+wjpBwX5etD04WBYWP9emOyYoz 8Ou2jbYRF8g38d85TxOnadEPBoKtLVX1mf+F8Dir0M44WI4wR55ylpjwjyjt1fzTUYtV UzQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=XdTJG4CPLonXSyU2w0Kd7IoDL/GBcIW5e86fo9ylNQE=; b=XmK1cxgz2qJqx8yfnQ5byY0ggajPV9dWkNknHZ8GxgEtNYpjr1qBA5zlSHCdOTiiIA Hh44Cn/cZ1/SjJ492CoV/hLJOvoAJZ+iCg4v7GBgDHlZqiCbeEJ3PXUT5w+WWFODfQsf Dsklwwgx3dPjpR/r/dOPcNBK/+rIp6auy6Wuf0jfOUufd0eJhNZ9P9Sw6Liztb54trFi Ma/wJd9ykU3ppjLpU53umWpITGQodmZwt7ZWBhsOgQkur1DrW8rxmNHD8Wz0zVowPp/b kSe+dLCWPKHRpAlKy06dPQ0zppIeYypi40okzWSBoDwDCVUxMdH+5DaszqRjYJ2a5CvY 7kDQ== 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq25si21045458edb.600.2021.06.30.17.47.01; Wed, 30 Jun 2021 17:47:27 -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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238228AbhGAAsP (ORCPT + 99 others); Wed, 30 Jun 2021 20:48:15 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:46355 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S237629AbhGAAsO (ORCPT ); Wed, 30 Jun 2021 20:48:14 -0400 X-UUID: c2b8a374425b4b68ba03d53489946f73-20210701 X-UUID: c2b8a374425b4b68ba03d53489946f73-20210701 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1162423325; Thu, 01 Jul 2021 08:45:41 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 1 Jul 2021 08:45:39 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 1 Jul 2021 08:45:40 +0800 From: Mark-PK Tsai To: CC: , , , , , , , , , Subject: [PATCH] PM: sleep: use ktime_us_delta in initcall_debug_report() Date: Thu, 1 Jul 2021 08:45:38 +0800 Message-ID: <20210701004538.23483-1-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)); } /** -- 2.18.0