Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1180798rwb; Wed, 28 Sep 2022 14:31:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4t/pfvIBsBaRS1WQkubi+1L249X4ZJ7TH8QSqDN7v0fOmzm5dPfrT36JuIAhtyfVIhs4wU X-Received: by 2002:a63:85c2:0:b0:440:34f2:c3c2 with SMTP id u185-20020a6385c2000000b0044034f2c3c2mr3904536pgd.330.1664400718751; Wed, 28 Sep 2022 14:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664400718; cv=none; d=google.com; s=arc-20160816; b=Hz4wapGNVdG/lPMjeurbEh8s1CY5T+Q2p1FZnd75R1cC/okv5VaXNV0+PESD7d+wQj lASTmbeA5ziYM+Yu8hQ+LKQouVFUTW6Y1krPNnrYlFpwOVv9pSO/oq/oLVNYohAqpfB9 ZQNmVCzTjudknnP4U8Wtjk8wcZXdCK6NbCVIY1UCIkbhemsZ9j9uImnC4ITqNUUVovZI sB/Vp8N0XkeoHrSGFFMN4eR5EMsE0nxmFP9EEZyBK9iTjYVmGZoQOVQOIXvvz9pJXolx IwkiKR3nu1JGcaFUF0AfOdbHvbPMHN7g+8Mmo3kz3btljvfUtIMFjRcmRs4nNwAVZGIX AI6g== 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=vcQTbtSOs9FbsFbv8V2t/E69I1IFg9ZKCW8F5npsSmY=; b=XBsAcEMGjsxwIXSPKCMdQejZbT/fH3Qkh6tYTm4Gvp2oYg5l5SdiVzU2Oe62SiJ+pQ f2COe2DVrai32KCnAs96tKqQNOO3UdAx7c7LHuQsDPhwBPxY3M4crkcyCvtoxmzwrkse aMb6FSEw1awuUXQC+Um8lACXsi3ZUm9M6qPo5qIu1MojRIWbC5M/VoOH/JYtVJT5QhL1 iVwgrPHdBd6YMP5Hjl1SRxk38u7EaegVd5MWigm7bMo6w41hZJTkF9mI4vfSGmTppGHm cJIgj8RB3ObxiQaHt8j7CrFLvDsfpRFqi5Q/AFywd33jsrB8RsOWqs/rYVeE+4rnFyBL mzJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CldA6l8P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a637904000000b004343046d7c4si6921378pgc.184.2022.09.28.14.31.46; Wed, 28 Sep 2022 14:31:58 -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=@linaro.org header.s=google header.b=CldA6l8P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234686AbiI1VFh (ORCPT + 99 others); Wed, 28 Sep 2022 17:05:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234150AbiI1VEi (ORCPT ); Wed, 28 Sep 2022 17:04:38 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB0A6DED43 for ; Wed, 28 Sep 2022 14:02:07 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id h7so9198753wru.10 for ; Wed, 28 Sep 2022 14:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=vcQTbtSOs9FbsFbv8V2t/E69I1IFg9ZKCW8F5npsSmY=; b=CldA6l8PsQE4volYx+2c+WpiB+nwv0YmjWOCRJ2jitsIiMxybyPJtc1LZnsKBM583H IXeB8uwDMiX2Uc6g8+9jGQfgAUVR6n5N0DVkNEc8tYjSn9M4dE498+sHWP+z//3xVfeS I0xXKkFUZf4BuNt0W03QY9IJ4/9w8KjqD1BBliYEhaNvUPcSm7o31KEj8pZazWuefKBJ pnJzcJ4fgqEIQ5ESEFKdygajtb+DMgNatYGSWLO3M84HQz0JEiSnOmGCrUydL71nW+A7 rp5UxeGC9txt2Y8R+PA6lMEBiu8bGAAeVuiNQQJGCCR6K1+I3savt70Pbj6++8YLXfT0 DQYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=vcQTbtSOs9FbsFbv8V2t/E69I1IFg9ZKCW8F5npsSmY=; b=FnFV5MY5FYIl5WVglpYoHvTlbgiMfxhTOFsB7HW1Mx3rU5dnGn+nppnG+nRbsaQMZS eYK9r87CCioKbjHvcKrxQorca656a44bzShurHk0hxtnSKVf0pb+xEX0Xc5wJ2FwBW7G VIVemK8gwY0iQocZ9tvV4JwbGWav4HWJ+nQDzkZ4f3nPb4LzVMerhfmB0P3txEYYqW1D V9Gl1fVAx4jST4omc2vMPbMKSc6eF4n8oL+U7fzbs+Gvv1KFwtXHtFNwrUcixD8gAGEN bPrXnYCrtUsTK7iSZBp4QYKnOPCSfeV6OG9jdrVjX+nYz4MTaNha0vVXD9BlaPwmJaUy +YaQ== X-Gm-Message-State: ACrzQf3PrcZ3CNHyhm4Itku3txDjfXf+FJaLuklofc51gYKAzJ9SjWPU ohI0tmcAKQnR2BGaoaBCxtvaDg== X-Received: by 2002:adf:e601:0:b0:228:60f6:2512 with SMTP id p1-20020adfe601000000b0022860f62512mr22632788wrm.334.1664398925745; Wed, 28 Sep 2022 14:02:05 -0700 (PDT) Received: from mai.. ([2a05:6e02:1041:c10:48a2:39eb:9d1b:8b8d]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b003b4931eb435sm2874300wmq.26.2022.09.28.14.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 14:02:05 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, Raju Rangoju , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Peter Kaestle , Hans de Goede , Mark Gross , Miquel Raynal , Amit Kucheria , Nicolas Saenz Julienne , Broadcom Kernel Team , Florian Fainelli , Ray Jui , Scott Branden , Support Opensource , Lukasz Luba , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Thara Gopinath , Andy Gross , Bjorn Andersson , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Alim Akhtar , Thierry Reding , Jonathan Hunter , Eduardo Valentin , Keerthy , Kunihiko Hayashi , Masami Hiramatsu , Antoine Tenart , Srinivas Pandruvada , Dmitry Osipenko , netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v7 17/29] thermal/of: Remove of_thermal_is_trip_valid() Date: Wed, 28 Sep 2022 23:00:47 +0200 Message-Id: <20220928210059.891387-18-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220928210059.891387-1-daniel.lezcano@linaro.org> References: <20220928210059.891387-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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 --- 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 b00fc1913734..e9b3af6c2084 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -138,16 +138,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 89afa59c4915..4e54d62720dc 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) { -- 2.34.1