Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp442247imu; Fri, 11 Jan 2019 03:13:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN6zLs68akZwMzFH9LII6YZvARPPPyeIn7lyojVOjm6G2cukVskubNZPkk+e+k7LfBPNdoIT X-Received: by 2002:a63:1b1f:: with SMTP id b31mr12877364pgb.66.1547205188063; Fri, 11 Jan 2019 03:13:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547205188; cv=none; d=google.com; s=arc-20160816; b=l2Kdxvr5gxh0KyEriVwTeOC9gB54nv8SG7NNy6oLU2EuiZM6hiBnrMa+sxBJXrx3WH 0cLCbIy0L0q4MHq5yYY2J0zm+yEyi/fAVQvA3CGZbxCUJ2Yuj1G+R6j1JkIaJoB9ycQh mPvJTZxUiqmJ7BVi74pAscWU5FMkOS7lJBb1XKqMp8V/oa57WLhxKUnC5b8ZfDeK3IEw TnbgLA4xBqC3J8q+/7Q0Mu5kcZMSdFBSxPb/+1LCG8V4XM0VAbx9D2zVHAzoz/Isrf/l jDXQGet2o6IwFHay0dgjrHaKKAy7VuyDpLYv8kcu5UHRrwuFr+wi2i4oKZhn/0fqEaL1 d3Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5ubVZo/vRc5t95oH2dtsFbAY0sBBAOrh7HRkMRXrYsI=; b=sRr0jrOTZ/maubriq1hDf4h2FpYd/tDjl66uOH6jekKZXKFhVsvgE+t7ltla/D6PTU u7WFTJCs9wBiLWiA5FEee1vNpep80Dm796C087xAQ/11gFPX34ESFnDGfxk7hzy/e4Vd 7NSZWIsFjTn4VUawK2d7KB3EjZQIleGPJBz7r5AmxD+w7ZNtNieloCidW6fDbg4MxFBt 2+4o5R4DuSld1r/ZydEcf8fUJu2/BXtS6sn6VaFF5K7jMkycHHlM3kBYTR7pq6IRYIOV 2guVdr+1Lm9qNl4WfZVoZZdMNgVa+FNC2Ga3BIbExjFW/wUiihwC2CFX+lrxKWB2Qq4I uxIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si68636356pgh.251.2019.01.11.03.12.52; Fri, 11 Jan 2019 03:13:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731927AbfAKKlf (ORCPT + 99 others); Fri, 11 Jan 2019 05:41:35 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:61395 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729816AbfAKKle (ORCPT ); Fri, 11 Jan 2019 05:41:34 -0500 Received: from 79.184.254.168.ipv4.supernova.orange.pl (79.184.254.168) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id dbb598f996a4f868; Fri, 11 Jan 2019 11:41:32 +0100 From: "Rafael J. Wysocki" To: Ladislav Michl Cc: "Rafael J. Wysocki" , Linux PM , Linux Kernel Mailing List , Linux ARM , Linux OMAP Mailing List , Ulf Hansson , Tony Lindgren , Vincent Guittot Subject: Re: [PATCH v2] PM/runtime: Fix 'jiffies' in comments after move to hrtimers Date: Fri, 11 Jan 2019 11:40:44 +0100 Message-ID: <1861668.sGDoxnQT1I@aspire.rjw.lan> In-Reply-To: <20190109231944.GA21177@lenoch> References: <20190109172336.GA1711@lenoch> <20190109231944.GA21177@lenoch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, January 10, 2019 12:19:44 AM CET Ladislav Michl wrote: > PM-runtime now uses the hrtimers infrastructure for autosuspend, however > comments still reference 'jiffies'. > > Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") > Signed-off-by: Ladislav Michl > --- > Changes: > -v2: Reword comment accoring to Rafael's suggestion > > drivers/base/power/runtime.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c > index 70624695b6d5..a282e74d1a16 100644 > --- a/drivers/base/power/runtime.c > +++ b/drivers/base/power/runtime.c > @@ -121,7 +121,7 @@ static void pm_runtime_cancel_pending(struct device *dev) > * Compute the autosuspend-delay expiration time based on the device's > * power.last_busy time. If the delay has already expired or is disabled > * (negative) or the power.use_autosuspend flag isn't set, return 0. > - * Otherwise return the expiration time in jiffies (adjusted to be nonzero). > + * Otherwise return the expiration time in nanoseconds (adjusted to be nonzero). > * > * This function may be called either with or without dev->power.lock held. > * Either way it can be racy, since power.last_busy may be updated at any time. > @@ -905,7 +905,10 @@ static enum hrtimer_restart pm_suspend_timer_fn(struct hrtimer *timer) > spin_lock_irqsave(&dev->power.lock, flags); > > expires = dev->power.timer_expires; > - /* If 'expire' is after 'jiffies' we've been called too early. */ > + /* > + * If 'expires' is after the current time, we've been called > + * too early. > + */ > if (expires > 0 && expires < ktime_to_ns(ktime_get())) { > dev->power.timer_expires = 0; > rpm_suspend(dev, dev->power.timer_autosuspends ? > Applied, thanks!