Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp938896imi; Fri, 22 Jul 2022 13:04:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u+HYlAC7k8KOnLK60x7LMCt4cvP/Zb0FiFryPgDmsFs5ZlnlwUD8MQ1yt+7BlnZILmSK39 X-Received: by 2002:a05:6402:16:b0:43a:f435:5d07 with SMTP id d22-20020a056402001600b0043af4355d07mr1465671edu.420.1658520265292; Fri, 22 Jul 2022 13:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658520265; cv=none; d=google.com; s=arc-20160816; b=0kXzFmkx+EHWKANlR3g6zTXUe+VLhLOYDGxA/Dh64wYyx5VUXaKDcX55pTdgTRkHdi arh45rDlbOqgz+B7MTcw6AzGBk/PC/IHgDiu2pm3Ara68ClPj4RYRmUBNQaRlmr03fpH s1NOYp6HpKpLyiSjR/IDtXlWjxQ2muk9znQCbMhfkMpfnTlB/Si7kbevlnpd29l8EhS6 hHiI8lFBdZxSebLPfog110TBkHlS1gH2vHmFaMLoYKI2ngtgxqx1vMHNP+ZKgLaZZDi8 fGtiY96SM6D+lCxtKay8SoZ/CMP3GdkTEYT6LFS3qbMU+AqzPcHIP13t5gW/Ww4HP4Vu JuUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m3yHMzkH3fXgNxlTdZV4uJD5eQrxfqVqNnQSzgsUY+c=; b=h34quuPwEGBwK6XwtoameAlCsa4Ox8wIl0Ik/bCx6vtxaPhjtS9qJtZpCHYaGsmXPc EngyfOZC+UydC6doH+5HpCCKdr8IvfVliuEui9pqMIHEa0Eos/OKteW/foHu5Qz2GAXW xFSc9U2WedqekiwhNRWrjEVv12IuVGAsRCuLwroJxpFEw3oOG36OBc3x+bG/V5K2HvTZ TjR6yCj6Ehj2oODuH32bJYh0eILamW8zF9SMxT4ZCFaaZJFf3AQfmAuWhVhyFxhLvbMq QtHr8xxuyFM0In8ErPKMp6JDMie9TDzQqh/Ca+2x/vryDkswoRvMImRwagPEu/zBojV9 nr0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=J7W7ZXzj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a170906348b00b0072edee8a633si6322303ejb.187.2022.07.22.13.03.59; Fri, 22 Jul 2022 13:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linexp-org.20210112.gappssmtp.com header.s=20210112 header.b=J7W7ZXzj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236683AbiGVUA7 (ORCPT + 99 others); Fri, 22 Jul 2022 16:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236592AbiGVUAl (ORCPT ); Fri, 22 Jul 2022 16:00:41 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8CD80504 for ; Fri, 22 Jul 2022 13:00:37 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id bu1so7857924wrb.9 for ; Fri, 22 Jul 2022 13:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linexp-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m3yHMzkH3fXgNxlTdZV4uJD5eQrxfqVqNnQSzgsUY+c=; b=J7W7ZXzjIzo1kHosDe6601n92X1SuBIOO/UYObdbTNuN420iB+j3mJMgJZ65Lv23Qe KNhzqeEkE50nBeagKstycoMWpYZmROTCZX1mGr3GdvRaCOfdTwQ8HBQcgkMttf7eiXtR duA6/1+ub1PXmywd3S/QFh/yJ+kF3Lre6RwKK4n/ujan2I2lm51NIuRLVt1EtXU5EEtQ 4gAGKBIMtrRe5Fo18QWHoyzPuOjfgqfFVGa4JA1vpF6WXK52r+CicyS6ykErrcqzdLEg 8mzdL9y/1z3mbY0gEl8voDQfaD9i1V6FlXVYGgjJ1xR5OhK4csGEDbhmB7mbu7CtGzG+ eYiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m3yHMzkH3fXgNxlTdZV4uJD5eQrxfqVqNnQSzgsUY+c=; b=3CggX2vEzIpqG8fo/bReW39rJRisADUEBK2/DwDLguRhW143loZDOwz9DqxICdkfjz pVH2z9v/qi3Uonvor19LYPyk49nJTp9I755dE3hae7fdA+85x/hgpjZhyXM2b8pq4O7M U94euxd2EFyiLYiM3m92qdonlx/108CaEaqAiiwUZYm53Dg1kQcwlIphacu0eCtGIPm1 6JbOfXvEs6Z4kqbjNPebiwKd0/MGGeI7MeqkJHkxqnUqCRbWxctNeYBni9jiiyfRGlAf Io5IM1+O0+yHAiatw4BNUWZuC7ReGLYvi3DDp++nQ0cVmJ/PCQ7sKhitFRPj0yQnrGIy ZUVg== X-Gm-Message-State: AJIora/RrKv/ZZ935H8uzZEHaa1Bje+SjUOe/kRSTEJCRA5sbcyjf260 y9ojUdQrCF3EHP8YQUJgKpJUqw== X-Received: by 2002:a05:6000:100d:b0:21e:69b3:1901 with SMTP id a13-20020a056000100d00b0021e69b31901mr939964wrx.622.1658520036337; Fri, 22 Jul 2022 13:00:36 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:957f:d36d:87f9:5c17]) by smtp.gmail.com with ESMTPSA id k23-20020a05600c1c9700b003a31b00c216sm6429008wms.0.2022.07.22.13.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 13:00:36 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, abailon@baylibre.com, lukasz.luba@arm.com, Amit Kucheria Subject: [PATCH v6 06/10] thermal/core: Move thermal_set_delay_jiffies to static Date: Fri, 22 Jul 2022 22:00:03 +0200 Message-Id: <20220722200007.1839356-7-daniel.lezcano@linexp.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220722200007.1839356-1-daniel.lezcano@linexp.org> References: <20220722200007.1839356-1-daniel.lezcano@linexp.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 e22e7d939c54..a8b1628937c6 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1159,6 +1159,13 @@ static void bind_tz(struct thermal_zone_device *tz) 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 60844e2d59bb..c991bb290512 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 f4c1e87ef040..60bfda1a1db7 100644 --- a/drivers/thermal/thermal_helpers.c +++ b/drivers/thermal/thermal_helpers.c @@ -174,13 +174,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz) 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) { -- 2.25.1