From patchwork Fri Dec 9 15:26:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "tip-bot2 for Kirill A. Shutemov" X-Patchwork-Id: 13069790 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 DEF90C54EBD for ; Fri, 9 Dec 2022 15:27:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbiLIP1N (ORCPT ); Fri, 9 Dec 2022 10:27:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbiLIP0m (ORCPT ); Fri, 9 Dec 2022 10:26:42 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DCC49077B for ; Fri, 9 Dec 2022 07:26:37 -0800 (PST) Date: Fri, 09 Dec 2022 15:26:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670599594; 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=YnPj5lB4rxpBSUa5UPOofCmiRBC/VTr/Zh4aKCCvQwc=; b=jmS550U8buP/hAhnhk+fDhqzA2wD8zPk7SecT3OKcbs0qbBSJCl/VxeLcIqfqvrMiPQwIr 8lMcsI8gsRo/QESZQje1bgKzjjOk/AapjRbYoZcqWwedMPNlhXLCpOkSwKUSBeIZ5QL03n Oy0DEKTcWSiFWECskjPzl7jVJhadDg2sFRH7dUyJSXuA8nKwo6v6R99RdMcjWFE/Sgsuwo h3b2+nL30b1RD8HmBTXGg3Mz+DOzMdLS7kRV8iD7E0fIFeS5dMC4ZoAPXYDReVSoQE9J3m d+yV5eM2xElgkup05d1nNzpNkPq0wQ/+aByDLbZ6+PhigLGQkh+L12tJoWOECA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670599594; 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=YnPj5lB4rxpBSUa5UPOofCmiRBC/VTr/Zh4aKCCvQwc=; b=8UMMqV7Zj49jWv4gSyEzNZnuieUrdgYwq7G4WwXivZDRBsK8J+Fu94mFy7mrkTElX2MAUB RgxI9KhtRI7kEeAg== 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/of: Remove of_thermal_is_trip_valid() Cc: Daniel Lezcano , rui.zhang@intel.com, amitk@kernel.org In-Reply-To: <20221003092602.1323944-18-daniel.lezcano@linaro.org> References: <20221003092602.1323944-18-daniel.lezcano@linaro.org> MIME-Version: 1.0 Message-ID: <167059959395.4906.5264145998268256882.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: 4432917b34e8a2a4cbea64684e9c8b175ba37290 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//4432917b34e8a2a4cbea64684e9c8b175ba37290 Author: Daniel Lezcano AuthorDate: Mon, 03 Oct 2022 11:25:50 +02:00 Committer: Daniel Lezcano CommitterDate: Thu, 08 Dec 2022 14:30:42 +01:00 thermal/of: Remove of_thermal_is_trip_valid() There is no benefit with the of_thermal_is_trip_valid() function as it does the check the thermal_zone_get_trip() is already doing for the sake of getting the trip point. As all the calls have been replaced by thermal_zone_get_trip(), there is no more users of of_thermal_is_trip_valid(). Remove the function. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-18-daniel.lezcano@linaro.org --- drivers/thermal/thermal_core.h | 10 ---------- drivers/thermal/thermal_of.c | 19 ------------------- 2 files changed, 29 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 6cda4a1..2635020 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -139,16 +139,6 @@ thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev, #endif /* CONFIG_THERMAL_STATISTICS */ /* device tree support */ -#ifdef CONFIG_THERMAL_OF -bool of_thermal_is_trip_valid(struct thermal_zone_device *, int); -#else -static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, - int trip) -{ - return false; -} -#endif - int thermal_zone_device_is_enabled(struct thermal_zone_device *tz); #endif /* __THERMAL_CORE_H__ */ diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 89afa59..4e54d62 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -19,25 +19,6 @@ #include "thermal_core.h" -/** - * of_thermal_is_trip_valid - function to check if trip point is valid - * - * @tz: pointer to a thermal zone - * @trip: trip point to evaluate - * - * This function is responsible for checking if passed trip point is valid - * - * Return: true if trip point is valid, false otherwise - */ -bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) -{ - if (trip >= tz->num_trips || trip < 0) - return false; - - return true; -} -EXPORT_SYMBOL_GPL(of_thermal_is_trip_valid); - static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, int hyst) {