Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4698611rwb; Tue, 6 Sep 2022 11:11:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ZjWmEUCbhh3CkGwCQpjfvTfFjHdi90S8PHq85i5Pjm2F4SR69CF5MCZU8DcPfUzGLX1D7 X-Received: by 2002:a17:902:820f:b0:176:9654:354d with SMTP id x15-20020a170902820f00b001769654354dmr15408500pln.79.1662487871478; Tue, 06 Sep 2022 11:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662487871; cv=none; d=google.com; s=arc-20160816; b=I007slGSbKI3gi1uVUXbFkLjWnhXt+gFbuoox+u1Yw7pzGGS4LPbh5VBkWakc0GBrP TVs2FHv/kvQIC9Up+TyokTVEh+OdTUB7bhPB1Uk+BH4C5CktrNPMv4j/BXzceDb2oTNi GGjOt9P74ZW1DFz1OcHv4Hmk/hfWtlJ5ggVDx/747y/lyTu1Ln93kmsg3pnV/842z944 N6ceLkgnumENAQI2A0rLt+ikS48Z6YBXJyPJRHwZa6We9XWCQsy4mBURJTZZRlzEf8Jf QJvmysZ/hrDfztHflWyBQBxPzJt0AKcmA51KMWSuNP6RuqceF9B0dpiRta0jD29VCSa8 Ab1g== 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=NFzfcStR9W+Nwf1uLdi1lXL2TUYpkWfd9XSuLVSwMnk=; b=NEsm0ETnvdHQmhXnRJ91nmHCvGzPlCfifN0IQAY1tIEdqj4oZcilcPswn0fP8pwJmD zwpUH7HtNDPCDIzIAAa4jVN9dr1ji3h9OmjrEE7HatPzHaJVamkkftLhMk1/edFosQJz kwL1mX/Soy+AEaFtmZZhl+DNBQKewTnWV+I3I/fasoHDkmOq+2Kc5WRTIoEE3MjeE7Kh ZOLi4vYOTKfdNqhJB9yZCaiy8S4GrKdVhZirGoZQqLWr1Sp1wrz36TBdOiwB4qs3Jrus Ckk0tThwNhJ0u+l8O0v0t61k/kgEfQ/9MCUHxSDtPN6oPCD8PN0Xinv1pi4UtpP25/3Z hTSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GlrL7+cd; 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 g6-20020a1709026b4600b00172adace273si13678610plt.535.2022.09.06.11.10.58; Tue, 06 Sep 2022 11:11:11 -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=GlrL7+cd; 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 S238363AbiIFRCg (ORCPT + 99 others); Tue, 6 Sep 2022 13:02:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239124AbiIFRAd (ORCPT ); Tue, 6 Sep 2022 13:00:33 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DBC43D599 for ; Tue, 6 Sep 2022 09:48:00 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id d12-20020a05600c34cc00b003a83d20812fso7817813wmq.1 for ; Tue, 06 Sep 2022 09:48:00 -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=NFzfcStR9W+Nwf1uLdi1lXL2TUYpkWfd9XSuLVSwMnk=; b=GlrL7+cd7i15KGj/i03cteP5PlR0MefSntaqtO8bBVZNn0tLzJ0+yxoh51iMWUHsMv iw1C5tT7/flSA8XgPjK0POZ3eudCtxJYEEIKvVr6IaFG8vCMUo5uD8mlkji7t2zD0rCp HSm1oz0t1F3lUUDXgkFPn8++XMmG9TMGr1xipsyZ+gxdINkzKlUD/yAdL45oXRoxjzDZ Kk6g76vJhtmj0woHBIh8PcsJfT+yWmfFbMF+nqA7lsNdggx4t2cq0N7yLZv6NhfsWRMc MnndEE9u+pWge8p56G4PQwM/a4D9MGueaj4qTORREJXC9u8ShM6NaCxMoqsAmTvmtsbm BO7A== 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=NFzfcStR9W+Nwf1uLdi1lXL2TUYpkWfd9XSuLVSwMnk=; b=OAsKAjzMu5UcHpD15DraFrN3q52DqTLACtBB7nx8z3S09KVNP/KYrGRbrSv/7ePawR qWFCpsyrcUKU17TKV9hEPMm8hVPPKp7ZVrZsrI3Mkjq5yapdd8ipS6JNpSG/7RxCoT1U BgAchNFx+M5+wozaW8uxhBTOlKEw38A2Fu3XkX6I/iQiJA8G1lkBMHanl+pgqXJc2yXi l9fzBYS7BEwxGnuee1Vm+NSAQZt+lch3Hk2R+7VO/ClZ0YDnsl17EJhTBmjBjqSyGZ2I Vg3Nr7825UmRHnvIVam3U5j7f6Jt/LOXt+kd81cymZNqBpy+A8cc5SUiqqrO17cjk6bH aHEw== X-Gm-Message-State: ACgBeo109P+1liI52jILaA7k7JHzBHQmU5kBSr39U8KeaEQOhJfANW6T CkGiaOYSt5IRc6I2WKRh/uFBRw== X-Received: by 2002:a05:600c:4e15:b0:3a6:152a:9143 with SMTP id b21-20020a05600c4e1500b003a6152a9143mr14260140wmq.20.1662482879938; Tue, 06 Sep 2022 09:47:59 -0700 (PDT) Received: from localhost.localdomain (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id e27-20020adf9bdb000000b0021f0ff1bc6csm7426600wrc.41.2022.09.06.09.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 09:47:59 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Amit Kucheria , Zhang Rui Subject: [PATCH v3 18/30] thermal/of: Remove of_thermal_is_trip_valid() Date: Tue, 6 Sep 2022 18:47:08 +0200 Message-Id: <20220906164720.330701-19-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220906164720.330701-1-daniel.lezcano@linaro.org> References: <20220906164720.330701-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,T_SCC_BODY_TEXT_LINE 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 0139bc1e4f87..4d1af11a6eb4 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -136,16 +136,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