Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1257599imu; Wed, 9 Jan 2019 14:42:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN4btjqnrDN5w3SeqWQEPC/Q34x8fu1vVlTA5qYBsosfH+n9rPe2Z6K6h8x6TBE/Ke48Xeas X-Received: by 2002:a17:902:8c91:: with SMTP id t17mr7627642plo.119.1547073740810; Wed, 09 Jan 2019 14:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547073740; cv=none; d=google.com; s=arc-20160816; b=Aw4P2uj0czwhKy0dGxMOEjKbsfqqJMzsa+jxLcT41NxUkDP3o1FerMl3l0vAyUw4eH TSMTD6ASPq1FVtjTvMRrc7b0Z2qiaJ3XpO3+zFaZC3a8ekplKz7/V4datZAnfctndYCf QbiMJXg2N7Roi+4OTn8OgCNF81zph/WAq7FI6InQ8wd8ldeFvBumB4BcZzj2nABJPSTN Wjuxyn1MDQHCf/27O596s/nOvoPMgFSXryTXe8YKeKXtc5oho3RuZQmlb+GbEy0lcLl0 xCxoEvBT1IriRH0HvZfeDYQLpIigN6puAY57nKriEKbOjeHU6XmtDP1+y0vbQOEfo897 IJjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=pD8lUbgsvAgC2PXrMO7w5wwrxNUokLAV2D7ynhhr574=; b=pmH/DbjF4hEcH7aiQIZ1gEDx+EIhdE0rGo/Iz2PbdYP/P2sHchMhpHq/Py8tE1o2Aa aEIiBx+y41chmAQiybHewkyGuVJtMJju1uPvUWtNIFH01IFIU4GRHTgGQonLiHdbPUsb rOJX+0Uk1SDho2odRgvfbEeCcOQhtW5c0kbcVU3SmnXgP4vVIGA2JKqxXmDgWeHw26dY LKKekHJ3QRTYGz00lterRPlMHUEDz0WEockjgjF2dozWNP9T4lQxyWRkI6+YMemyttIa 370FlAXyyNiTWz4bQjt791rUFe15aSu9ZrNJNdUt+vb+WtgTKmmCJq5x/4KRJ21pONxW FF/g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si3476736plo.108.2019.01.09.14.42.05; Wed, 09 Jan 2019 14:42:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726938AbfAIWDP (ORCPT + 99 others); Wed, 9 Jan 2019 17:03:15 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:43588 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfAIWDP (ORCPT ); Wed, 9 Jan 2019 17:03:15 -0500 Received: by mail-ot1-f67.google.com with SMTP id a11so8119391otr.10; Wed, 09 Jan 2019 14:03:14 -0800 (PST) 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=pD8lUbgsvAgC2PXrMO7w5wwrxNUokLAV2D7ynhhr574=; b=CiwwG7xqXkgodko4KQGcbi6cvO1Ck14xNtC96PWsvnp3+jUthZ0xNM3I77yWNUaiSY igqEKwJN/q0W6Kv3rjY+xTFcwqleKPrhoESiam7o+v4/dvYVB0UzRjSzdSCt3XRlc142 Alg+vyMW3fkEu0fR5ubibZVsMknUOo5UOgXpEf1lTXuDRyoDiXEN0N3ytHEosgSCu9En bcMsljAT3ZWzRljn+e+mV38GzUNMrUdSxdzLDnbSlyfhuxG1fUFrF0Jhpe3PGXalU2DX S6Y8e6ecYh+XUiyTYrLBU1JAOQGoKFQ5nmAezFsd7yOpgW2bBEAzdHjtTO5JF5lQ7Zy/ ACZQ== X-Gm-Message-State: AJcUukcCTbEGIeztXhf2a4bgmKmO5ccr2tt1gMVonO2qySH5NTZn0G73 TpfsPBeL/GkBVYyB8pExxEXBLxp/O34k8rmNNkk= X-Received: by 2002:a9d:4c84:: with SMTP id m4mr4884682otf.124.1547071394509; Wed, 09 Jan 2019 14:03:14 -0800 (PST) MIME-Version: 1.0 References: <20190109172336.GA1711@lenoch> In-Reply-To: <20190109172336.GA1711@lenoch> From: "Rafael J. Wysocki" Date: Wed, 9 Jan 2019 23:03:02 +0100 Message-ID: Subject: Re: [PATCH] PM/runtime: Fix 'jiffies' in comments after move to hrtimers To: Ladislav Michl Cc: Linux PM , Linux Kernel Mailing List , Linux ARM , Linux OMAP Mailing List , "Rafael J. Wysocki" , Ulf Hansson , Tony Lindgren , Vincent Guittot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 9, 2019 at 6:23 PM 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 > --- > drivers/base/power/runtime.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c > index 70624695b6d5..096f7996d914 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,7 @@ 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 'timer_expires' after 'now' we've been called too early. */ I would say "If 'expires' is after the current time, we've been called to early" here. > if (expires > 0 && expires < ktime_to_ns(ktime_get())) { > dev->power.timer_expires = 0; > rpm_suspend(dev, dev->power.timer_autosuspends ? > -- > 2.20.1