Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1289143imu; Wed, 9 Jan 2019 15:22:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN7bmz/kIrKsqj+SHSDw/VINJ6Pn/WGfUhT7iQbfBg8hmv8SNqnLqqZ19ZTGg0NUMgM3JC+3 X-Received: by 2002:a62:2606:: with SMTP id m6mr7680696pfm.133.1547076151151; Wed, 09 Jan 2019 15:22:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547076151; cv=none; d=google.com; s=arc-20160816; b=sa728VBCpqcUNzBLu5oy+tFDvlpdm1q4khe+V8Y1wAVV+fhAQBF8z98kNj7zEWDOX0 43eL/fu28nRHo9gltY4O86+Gpi+wwaKs9+CVX93TSWqCZnhIcdKN1pwoMR0krZkaLhFP cFpZOXlTKyyaKiEX2mZjOD0uR79A0Pj4bpX4tljbnjmlsTrqSDY1r7fNwAvqpLdP5tJ6 VqGUnVUTmMYSe33CyF6mVxmdIivqOAYMmSYJGiseZxhVDrRtRjXrXSKqk81R6jVO9SSl Z5dF6HSJJtq+fSBEbXNUU30kC7o6VGbTFT5VViVYIn7DCZd9zQFaCFykYvxsLK4weli7 X+yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a7RAbzywwpnZBy4Q6A4845yvjABleBYxOAYH2BltDyc=; b=c5tV3qbFJS5Fn4Bt+us+TYkajqtodYOLp/sJ59epmtJvIz/dtJW2EvprFOz5E1m8Lf mywhoGAc/3EmqWrgLgHHTLBUNKwi2iPx9NgBS9sOzYlgyai3K2erEBLnQjpt2Fkd0Y/n KGpvwzfx3SBvZEDLGNLaQldVt38oGlfxAlSjG5j8Ajdrk+R+ga8BMekDsua+37i4CN0Y XgvK/X9naiK7rv+dGitoF1vfwat9mFwXacFauBZvQ040T9KVpcWDTY5dhEMIaApuUIwj Ky6HCDS72yCgXBogJK3qjl6CZjaaDxhvm8S7Owr0CXr1P4Jb9oWsp8bZ7VLjm9FyOcYk /oVQ== 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 h3si51444884pgl.468.2019.01.09.15.22.13; Wed, 09 Jan 2019 15:22:31 -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 S1726752AbfAIXTs (ORCPT + 99 others); Wed, 9 Jan 2019 18:19:48 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:35514 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbfAIXTs (ORCPT ); Wed, 9 Jan 2019 18:19:48 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23994074AbfAIXTpoBnBl (ORCPT + 2 others); Thu, 10 Jan 2019 00:19:45 +0100 Date: Thu, 10 Jan 2019 00:19:44 +0100 From: Ladislav Michl To: "Rafael J. Wysocki" Cc: Linux PM , Linux Kernel Mailing List , Linux ARM , Linux OMAP Mailing List , "Rafael J. Wysocki" , Ulf Hansson , Tony Lindgren , Vincent Guittot Subject: [PATCH v2] PM/runtime: Fix 'jiffies' in comments after move to hrtimers Message-ID: <20190109231944.GA21177@lenoch> References: <20190109172336.GA1711@lenoch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? -- 2.20.1