From mboxrd@z Thu Jan 1 00:00:00 1970 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 CD28FC433EF for ; Mon, 4 Jul 2022 08:05:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230505AbiGDIFg (ORCPT ); Mon, 4 Jul 2022 04:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbiGDIFf (ORCPT ); Mon, 4 Jul 2022 04:05:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1FBDAAE6B; Mon, 4 Jul 2022 01:05:34 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B2AE23A; Mon, 4 Jul 2022 01:05:34 -0700 (PDT) Received: from [192.168.33.14] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 63F6B3F792; Mon, 4 Jul 2022 01:05:32 -0700 (PDT) Message-ID: Date: Mon, 4 Jul 2022 09:05:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 06/12] thermal/core: Move thermal_set_delay_jiffies to static Content-Language: en-US To: Daniel Lezcano , daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, abailon@baylibre.com, Amit Kucheria , Zhang Rui , rafael@kernel.org References: <20220703183059.4133659-1-daniel.lezcano@linexp.org> <20220703183059.4133659-7-daniel.lezcano@linexp.org> From: Lukasz Luba In-Reply-To: <20220703183059.4133659-7-daniel.lezcano@linexp.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 7/3/22 19:30, Daniel Lezcano wrote: > 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 > Cc; Eduardo Valentin > 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 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) > { Reviewed-by: Lukasz Luba