Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5424750ybv; Tue, 11 Feb 2020 15:40:38 -0800 (PST) X-Google-Smtp-Source: APXvYqzDQv8/Q9npb954qMBnzmfJ8smiOVPP5Zy4omraA1jQq5QQr9L+mCPsWPNoNQS20XmO3256 X-Received: by 2002:a05:6830:1049:: with SMTP id b9mr7509139otp.100.1581464437885; Tue, 11 Feb 2020 15:40:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581464437; cv=none; d=google.com; s=arc-20160816; b=usokDBLYTxQo66ixplAh0773wr/LuzJLtfqyJqwMJdE98g9pp3OOphJsNGgxY14iXB PgoXwZpm3ZW21NyLH0vGlF7u0FoyK7SZlFyvLr2eo15ETGi403xK+uEDIppRInoBhaVo WqnATTMaj+C4Q7G5Oj/howjkkUm6om2tHIhBCHZxis3VkDGoJqAEWOKzWnULGydRhn6u xcMzZgCluIs1JdKlwUy5gVCOVj7Qu5KdezkJGxGeXG9dJsfQi6UTcf3ISVDxVlgDVwPn Wxy2rxuEnNFA7UT0FpdFSsBRynfdDJiIUin1xuBn5GF83gZYgI9LgA6ufVz38sxhFzFW nKpw== 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=y/JI6iZdMjvPQ8lnKGbv6u71cna0QrW9qPvS7wMSQLQ=; b=VFh/DeKw9W8tBWeXuA9pICWa0C3DHcByNkEiQfbYwl4/0ngjggAp6gCAeZLRgn+am7 AEYFtPvKViodVcBBRA23uyxgDb+n1mUHk5Jf716TFAVIWYuvfn4l9c2itqsJJOgM7z42 xp58J09zrt+dn66M1F73A5Bl+6inYw1WzbpwN1tgqrlLkfcdZpoIAbdaHhQIzY9RDAzv hkNwEdEFzzJ5DXu7cmbEWmg73GOv1PIh0zlFZxHGHPRe9vQEPzMIvwWEbnxhL0UTEnNp z+TCq1vRdjGsk5SR+widJL0n7vckCZLuuN7G1WMoWDVsAzK9aXhBSiQxQmcfI1fyGct/ z1MA== 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 a17si2741524otp.236.2020.02.11.15.40.25; Tue, 11 Feb 2020 15:40:37 -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 S1728060AbgBKXj6 (ORCPT + 99 others); Tue, 11 Feb 2020 18:39:58 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:53061 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728130AbgBKXiv (ORCPT ); Tue, 11 Feb 2020 18:38:51 -0500 Received: from 79.184.254.199.ipv4.supernova.orange.pl (79.184.254.199) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.341) id 173fdcca87f84597; Wed, 12 Feb 2020 00:38:50 +0100 From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Amit Kucheria Subject: [PATCH 12/28] PM: QoS: Adjust pm_qos_request() signature and reorder pm_qos.h Date: Wed, 12 Feb 2020 00:07:01 +0100 Message-ID: <4773738.66pf8vIe9V@kreacher> In-Reply-To: <1654227.8mz0SueHsU@kreacher> References: <1654227.8mz0SueHsU@kreacher> 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 From: "Rafael J. Wysocki" Change the return type of pm_qos_request() to be the same as the one of pm_qos_read_value() called by it internally and stop exporting it to modules (because its only caller, cpuidle, is not modular). Also move the pm_qos_read_value() header away from the CPU latency QoS API function headers in pm_qos.h (because it technically does not belong to that API). No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- include/linux/pm_qos.h | 6 +++--- kernel/power/qos.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index a3e0bfc6c470..3c4bee29ecda 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -137,20 +137,20 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req) return req->dev != NULL; } +s32 pm_qos_read_value(struct pm_qos_constraints *c); int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node, enum pm_qos_req_action action, int value); bool pm_qos_update_flags(struct pm_qos_flags *pqf, struct pm_qos_flags_request *req, enum pm_qos_req_action action, s32 val); + void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, s32 value); void pm_qos_update_request(struct pm_qos_request *req, s32 new_value); void pm_qos_remove_request(struct pm_qos_request *req); - -int pm_qos_request(int pm_qos_class); +s32 pm_qos_request(int pm_qos_class); int pm_qos_request_active(struct pm_qos_request *req); -s32 pm_qos_read_value(struct pm_qos_constraints *c); #ifdef CONFIG_PM enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, s32 mask); diff --git a/kernel/power/qos.c b/kernel/power/qos.c index afac7010e0f2..7bb55aca03bb 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -235,11 +235,10 @@ static struct pm_qos_constraints cpu_latency_constraints = { * * This function returns the current target value. */ -int pm_qos_request(int pm_qos_class) +s32 pm_qos_request(int pm_qos_class) { return pm_qos_read_value(&cpu_latency_constraints); } -EXPORT_SYMBOL_GPL(pm_qos_request); int pm_qos_request_active(struct pm_qos_request *req) { -- 2.16.4