Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2260700imu; Thu, 10 Jan 2019 10:59:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6NgGR4JNpTk5TzjbVwfMMNpjznQi1QHHgq+9sLbgEPZ/Eva9ulWGwrT3P8Ezo3ZdREZMS3 X-Received: by 2002:a17:902:5a4d:: with SMTP id f13mr11807422plm.49.1547146758962; Thu, 10 Jan 2019 10:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547146758; cv=none; d=google.com; s=arc-20160816; b=A4EPVZJN3BW106+W4hYKA1TbaAUAhpGtl83ZEAn4kk8nNTvoDJ77G7dHmcY2OpPlEr 3MC+mqp6UVDz2uRUOeSbk525IZX7mZ1tSf6OK2gi1R0R+vW43+zlvCL3230cpMfNa8a8 JceQfx/EdhnKJzhl5o+WV1/dgrvqj1pqnoqgFRNARpUG2tB8aPr5kpKPRM2RGn61asKN abMj2XFi3KPEsxumHdM5O+BsNp3fJ8XuMEYVXMwVp/34WGwEjTctaiv6GxNr4KZ89okt KswFrDl2n3cOCd1fJDELSFmAPeIRoQVhzMI9JiQf+bGMDuGGxt6Whrk9/OLldmL7TkrM a5+w== 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:dkim-signature; bh=ZCHJ/TvwzF0ThhfFXbmNmVm1YbERtS5kXlpqZlpNyCE=; b=P9NN8Ag2NmsH9j8PsKcOswWhTKN+Yo16070nKyfFciLnc7i1CM2P4CRbhfiX5zdXVM 27YTzpi0YyL8v52/UKJGqEyy+iQjG0s2UsWJfsg6uX3VqzeQAtqSJC1tOkDUMXKDyez4 REI5GP92zNVUj3Qbt1bEiqSARK+wn9S2DPMPgJ285xEQvTC9CFjJps3Wol/o9yvdukmW WK+TW7w4uAdOkMrh8iXt6224elv98bis8O5r0bjqzxW0RtCXYaVYaNPU4wyGM1HGSuET nph6KJDRa2z8QszviW+nuzj+deGd4LhMRGPGcIzUc79Mrgfw+Qv41htaBze3ljgsPa4M cjYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ANgcHEZB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si23430178pgt.289.2019.01.10.10.59.03; Thu, 10 Jan 2019 10:59:18 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ANgcHEZB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729123AbfAJS5m (ORCPT + 99 others); Thu, 10 Jan 2019 13:57:42 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:53843 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbfAJS5l (ORCPT ); Thu, 10 Jan 2019 13:57:41 -0500 Received: by mail-it1-f196.google.com with SMTP id g85so203210ita.3 for ; Thu, 10 Jan 2019 10:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZCHJ/TvwzF0ThhfFXbmNmVm1YbERtS5kXlpqZlpNyCE=; b=ANgcHEZBrNT721hW/GfEtszNfqcPceiM7DNUXGU4oJSlRB07TDvf/Kpfh73ZKQhL1T G9x8WXvL6aE8V50fP8oNmTHGJkusCsd4/ZnP6ebKgst8p4+5ubeHl4KjcPnb5ASpe16e iB72cAOUnZnrImrSIdq/Q5T5lcQMzw5ZDuc+k= 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=ZCHJ/TvwzF0ThhfFXbmNmVm1YbERtS5kXlpqZlpNyCE=; b=DD9xK7kanQxrX0u28Np8jnNpQ3/UNXQOnHs+nwZE50Q714DmsjxHUCYP3JuxtJM1zd Ma0eN1NBTm4eQ6VOga+jqQdWd7xcq53ZMjyzeEEwv//UCkxP4R9WW5qpLlo+42+I78Je BuVkZwV7E3gjuh6ZM8CTwUzEllRW4/yFsjFoV6eeAO7hGrH43MK/uWcQSsWc83f+MwuD qqjg7T3dsCS9jqSJAviLiOu6SLHfEXjHn+8ag8QsV2oMCfhpucywNRmgdMIUIgUJomQA K3BKZQlIdlf0gpeHvN35NT5z+4C5rt1lo7YRS6CYDuRATRSgYHqxMSZuEd41fAMOSAiT yxwA== X-Gm-Message-State: AJcUukfit9nVYTy0G9SYyrEC5/g07aIBgT9cosKNWqA0Vkph++gCoAOW o1s/JGxVu1YtMMfVhilL83uqgfz2QcxVJJtWctxd8w== X-Received: by 2002:a24:6f42:: with SMTP id x63mr24331itb.152.1547146660173; Thu, 10 Jan 2019 10:57:40 -0800 (PST) MIME-Version: 1.0 References: <20190109172336.GA1711@lenoch> <20190109231944.GA21177@lenoch> In-Reply-To: <20190109231944.GA21177@lenoch> From: Vincent Guittot Date: Thu, 10 Jan 2019 19:57:29 +0100 Message-ID: Subject: Re: [PATCH v2] PM/runtime: Fix 'jiffies' in comments after move to hrtimers To: Ladislav Michl Cc: "Rafael J. Wysocki" , Linux PM , Linux Kernel Mailing List , Linux ARM , Linux OMAP Mailing List , "Rafael J. Wysocki" , Ulf Hansson , Tony Lindgren 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 Thu, 10 Jan 2019 at 00:19, 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 Acked-by: Vincent Guittot > --- > 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 ? > -- > 2.20.1 >