From patchwork Wed Nov 13 18:54:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 179342 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp10001572ilf; Wed, 13 Nov 2019 10:54:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyX9oNb6gboIUSiidYKw+KcbfnhGXPANol+xwcOxKuXjkjohVt/Tr/EPt0+hgTXyhjmmiOY X-Received: by 2002:a17:907:206d:: with SMTP id qp13mr4216602ejb.92.1573671285725; Wed, 13 Nov 2019 10:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573671285; cv=none; d=google.com; s=arc-20160816; b=RxS/HA/7uBkq4TpHZt7Lg0oVmdCNeBNyBxCa5wRK3oEhJAM7+B+vrnR4nBABROYhk1 OX6BuFI3EE4jA1THWBUcIEU1766lGlHvR2h+aS+8aMKWSIFfGmijhbArWTWtgfQwfKBl TR9mljoxN7PhdeYA3bIOZT+pYN7xKmr7cuudl6j0Nsxv/sRRIP+b9CdF+FEmISonN/J/ v3sofJZCWtFmnN51tZSSXfWUCsGOS9z3LkipZIUb3LJu2g4JX2f9IsQvR7bCvGEE64ZX NTRwhRkIbFv1MVJH0H7WKwpDN/mS6CDqsSIwGgetcHNgq/Edo0yOVZvChv/rGF8td12g oqqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=znf7mo4G9jPIzVfiurHEWnDBV3kCfIxmHe1zoQ/j1JI=; b=hLIyiaLk54yJKatrKnprl1b2G+cH9alqTF687iFToSC2r5c8mgBDCIaR6W5oraVX1q 2xRv8cETWyzwGFJ+8hyA8ER8AkHT2JCzrhYhRNqUV/hgCFcr6b30AjM2CAikYtNaeZSU scU/rXQumr5oWbCanzyYdFehDp8cH6S5oC0+wslkA9bN3Iom0c0CSDTt4fdQandsOj7e vYNYWvX56WCsJEObi9ObMOz0T0XStfm1pGF6EGQ5XcTPXoYDLyzNkGcHGxmbK/H2l1ME AqODz65iSn1OmQ9Fu5Cg+HZ95KsJDebjiNIz0NMMbLZFh5DqfwDVUKvsLy8wmvjuTRbS hQiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jXqpKJGh; 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 l64si2200736edl.306.2019.11.13.10.54.45; Wed, 13 Nov 2019 10:54:45 -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=jXqpKJGh; 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 S1728726AbfKMSyj (ORCPT + 26 others); Wed, 13 Nov 2019 13:54:39 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55937 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728092AbfKMSyf (ORCPT ); Wed, 13 Nov 2019 13:54:35 -0500 Received: by mail-wm1-f65.google.com with SMTP id b11so3129333wmb.5 for ; Wed, 13 Nov 2019 10:54:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=znf7mo4G9jPIzVfiurHEWnDBV3kCfIxmHe1zoQ/j1JI=; b=jXqpKJGh1V1p5/zJKPLSg8aHuXISAB+G6IUG18JBJ++ehzluBYs0E7RavYC25cumyh zylqE+mpEVyNVyEFmLw0uCdQi1P8cwzPE5q10jbtC157GvZwsg138aXk0Hv7RgOswA1q K9v27zdFW1hggQaqzvF9WZ1sz2eaKn/3YM6w9FbLsSPvPXR0K24Bn0jWRdqqhkM+V4ie gXaOtkQRnA5oINYeBEzRNQT7bHQO3YhGy+r10vMKcjpJyj74YWSegP0Ka9kz6r6QdKZn GkoqMj/u4If5cgtA70HuerUoNfQDA4sUz/4UV3lC+pfcttUY0x6tzv+iJwPQIFK84oUt Lacw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=znf7mo4G9jPIzVfiurHEWnDBV3kCfIxmHe1zoQ/j1JI=; b=iwHchvtB44EVRIcUVNAfrEXcgnjTg0oyFWTnRnAQ6ftuZwWGcmvu+48EtmPp+LNVe+ 207aySOE7ns4+g/h9qARYo5Amc4oIY0Vh9evhQWTT4wJlCGWijZEtuHzIqQuvI4eit67 cnsKmPDGmI+8cM1NDIRbkEl2INbl4dIJ40q6BmsE7WV6YUKR6xzvGUi78D9Xj5BIaEWy we6zgm2leuo+o+TnjNz3j8hf1n8UTxW/dLaFM8ob9Xd0WYOupl2xcf+1ITskQbwBBGrT Xu9568AH+NzVuB/osmQ4+d2kH4mffI62E9+nkYBa8Tw8W/ixthUdzyZSA52GYkFKB5z/ etkg== X-Gm-Message-State: APjAAAWchgVuYGw1i+1Z2IteguUOUP+RTpjeao7YHMxSuHBQJG0Obz37 W0I2INONc39ESVefUFPbdX1ds4uU96Q= X-Received: by 2002:a1c:f612:: with SMTP id w18mr4491750wmc.28.1573671273779; Wed, 13 Nov 2019 10:54:33 -0800 (PST) Received: from localhost.localdomain ([2a01:e34:ed2f:f020:ec92:781d:6592:837]) by smtp.gmail.com with ESMTPSA id 17sm2652848wmg.19.2019.11.13.10.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2019 10:54:33 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org Subject: [PATCH RFC 3/3] cpuidle: Use the latency to call find_deepest_idle_state Date: Wed, 13 Nov 2019 19:54:19 +0100 Message-Id: <20191113185419.13305-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191113185419.13305-1-daniel.lezcano@linaro.org> References: <20191113185419.13305-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As the dev->use_latency is filled with the latency value when this function is called, use it as a parameter to the find_deepest_idle_state() function. Signed-off-by: Daniel Lezcano --- drivers/cpuidle/cpuidle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index f68a6c9e8482..659d8b1ece6d 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -124,7 +124,7 @@ void cpuidle_use_latency(unsigned int latency) int cpuidle_find_deepest_state(struct cpuidle_driver *drv, struct cpuidle_device *dev) { - return find_deepest_state(drv, dev, UINT_MAX, 0, false); + return find_deepest_state(drv, dev, dev->use_latency, 0, false); } #ifdef CONFIG_SUSPEND