From patchwork Thu Jul 28 15:41:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thermal-bot for Julien Panis X-Patchwork-Id: 594271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99D9DC19F29 for ; Thu, 28 Jul 2022 15:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbiG1Plj (ORCPT ); Thu, 28 Jul 2022 11:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbiG1Plh (ORCPT ); Thu, 28 Jul 2022 11:41:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2BC969F2E for ; Thu, 28 Jul 2022 08:41:36 -0700 (PDT) Date: Thu, 28 Jul 2022 15:41:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1659022895; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+pyH49y7P/3OQsCvBGe1vkcY/bRVMy0433bJ+aG+5mQ=; b=Xh97BAH9l5EcZmZy4Xhl0SV0QO8V5dUq5Zqt8eU8R10t3BmK6icZ+wztadaLxWchwoTGbw n0hHL64hGd8SMf3TZAt02jpH5ArFc8LSjx8TyCAYy0pYmREF+prw5eYWbvPCkCdH3lhvht XR947Q14pIgsel9138+IkwwIr/amsxWoACpO5BU7s0/A5ooIL5P/oWe6EXo42cPTtr4fxB 320JpS6wmfoIRKry1/otS7gu8FJ4JmzQVH4MmrVAMbXq7s7TL7JZlDbwrBQOZbYYitx65w IjlNo5zPEelhkXwNjgMVPu+AZjx77f+6eWHslzRh7AwZJzEQXP8FAraXfdx9FA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1659022895; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+pyH49y7P/3OQsCvBGe1vkcY/bRVMy0433bJ+aG+5mQ=; b=DvCVMDSFTZbCKpP6rY6RCYK6+vQo63msmtKcDCDOM+uILn40H7ITZ7O5brdmMWeMD5iVbF 281tbcfDimauXwDw== From: "thermal-bot for Daniel Lezcano" Sender: tip-bot2@linutronix.de Reply-to: linux-pm@vger.kernel.org To: linux-pm@vger.kernel.org Subject: [thermal: thermal/next] thermal/core: Move thermal_set_delay_jiffies to static Cc: Alexandre Bailon , Kevin Hilman , Daniel Lezcano , Lukasz Luba , Daniel Lezcano , rui.zhang@intel.com, amitk@kernel.org In-Reply-To: <20220722200007.1839356-7-daniel.lezcano@linexp.org> References: <20220722200007.1839356-7-daniel.lezcano@linexp.org> MIME-Version: 1.0 Message-ID: <165902289445.15455.181218658957508025.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The following commit has been merged into the thermal/next branch of thermal: Commit-ID: e5f2cda61d068e14af95ed8ee74c80e565af3f29 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//e5f2cda61d068e14af95ed8ee74c80e565af3f29 Author: Daniel Lezcano AuthorDate: Fri, 22 Jul 2022 22:00:03 +02:00 Committer: Daniel Lezcano CommitterDate: Thu, 28 Jul 2022 17:29:55 +02:00 thermal/core: Move thermal_set_delay_jiffies to static The function 'thermal_set_delay_jiffies' is only used in thermal_core.c but it is defined and implemented in a separate file. Move the function to thermal_core.c and make it static. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20220722200007.1839356-7-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 7 +++++++ drivers/thermal/thermal_core.h | 1 - drivers/thermal/thermal_helpers.c | 7 ------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6afdf06..14f31e5 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1155,6 +1155,13 @@ exit: mutex_unlock(&thermal_list_lock); } +static void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms) +{ + *delay_jiffies = msecs_to_jiffies(delay_ms); + if (delay_ms > 1000) + *delay_jiffies = round_jiffies(*delay_jiffies); +} + /** * thermal_zone_device_register() - register a new thermal zone device * @type: the thermal zone device type diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 60844e2..c991bb2 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -112,7 +112,6 @@ int thermal_build_list_of_policies(char *buf); /* Helpers */ void thermal_zone_set_trips(struct thermal_zone_device *tz); -void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms); /* sysfs I/F */ int thermal_zone_create_device_groups(struct thermal_zone_device *, int); diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c index f4c1e87..60bfda1 100644 --- a/drivers/thermal/thermal_helpers.c +++ b/drivers/thermal/thermal_helpers.c @@ -174,13 +174,6 @@ exit: mutex_unlock(&tz->lock); } -void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms) -{ - *delay_jiffies = msecs_to_jiffies(delay_ms); - if (delay_ms > 1000) - *delay_jiffies = round_jiffies(*delay_jiffies); -} - static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev, int target) {