Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1380967imk; Mon, 4 Jul 2022 01:45:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s6DqLtKttx2GwVFE3ALplAiMrb6FKWjLpBcL+vZk1R9rb9Zr2jCM/7RkM8D9MjNvFplvZt X-Received: by 2002:a05:6402:358c:b0:435:9daf:e825 with SMTP id y12-20020a056402358c00b004359dafe825mr37243297edc.375.1656924329558; Mon, 04 Jul 2022 01:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656924329; cv=none; d=google.com; s=arc-20160816; b=foWpfBXML0X/bUncUvh9utV2ipcDxX90mfgU8D91+xKZd09b/zRp80z2mnHiJkCdL0 sIIGwp0viLELBEDdjbjLwa+ZIB+G8f2wEG9bEXFIggbI6ZpvFJJx/BA2T8OpTZdi+gLA i7arv2pXGSRw0iGIHRQyAX6G9smoninN7ouPXrHC/zEfLEEHyZDvS9pjH3yGjyTVgQqe uADYzj4FZEBkufhf2k7/kLYebz2e+WoA9/HQT3mAaM7VXVnb7nljv7rlo3Zt9TE3bX0g FRc7JJkXO0uHv7fc0+5Eo2ORS35Az9Tz+35g3H5rmMRcV80z5Bzzc7Si6Nd9H/w+9H3g z3hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=yaQBI8hdAfhWrRK7Xzz2zyYbmIQiNlATtbVUJ2O2Etc=; b=B5Jz8JosEtRSNPED5BPZU6n/G/gU1RMkhaj2biq5APDyFJ+QMnKL3Oh4r1VmVsDcPj CUBaB8SUykz+E7e9WuP4T6F6hgU4VJA/c5fnFya1lTzqnTZj45HD1u+Fzx9m2Ov0pklj DgZzLs0yRX8LFlQ6FqGns9lLVnKpEyiP+/s8aI5amE0Aplw8P3JJSR7ARpGoxTPrUedb JoJVPkHaWgh5tDpYh4k63Vp4qjPgFiU912/L91hg5UQfoyVsi3gI0G4Jw6rs4nNvLjOD Fji2FNzZRhEWBIJjo6bNwecWuymu7oeDrOK71D/pKJaG893WZDMznJxYX8vSsbRNqNge JAdg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa39-20020a1709076d2700b00726b4ecf7b6si11807675ejc.466.2022.07.04.01.45.04; Mon, 04 Jul 2022 01:45:29 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232554AbiGDIFg (ORCPT + 99 others); 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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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