Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4631256rwb; Tue, 6 Sep 2022 10:07:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR477ePXPBGS+TvAzlYKh9Tqr/yIyj2KT7b7C4eH4Us0oWmxVUpCYc05mnHOO7CbUnjLXvUD X-Received: by 2002:a17:90b:4c04:b0:200:5769:22ef with SMTP id na4-20020a17090b4c0400b00200576922efmr13099795pjb.6.1662484068969; Tue, 06 Sep 2022 10:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662484068; cv=none; d=google.com; s=arc-20160816; b=tsOgHxwqwPtuq0wzz3dN/UFbEp3zZ0BBBVZxjIQtVBTWJ0tK1YBDh4iGOcXrd5Hgnh QjoP0W4gV0w6yo0giWnyTkVAcOCHm6HrJhq3rUXeYrJP2OpDm1CxhuiK4A/LvIP1s84d LrZ77IFkgUsl4nRyJ7kcv3BuK7wPDAzKV6Bvy3jx/iVO13QA6vBAzOZEwBtiArUE2Xet 3RZt1WofxTvowQt5zPw51TYhbT27cpqPHUVO5b5e29svUkAdEDz8GnfwMfU+4g2ss1hy 7/NoMYnd4luBTjhheOuF+oqPL/Mez2SavOSmYX014W+S0vS0ZvAlSfLWahfKZ2E7rqtt 5FAw== 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=wKElCC452+uQH9oPG73me3V/zKr0MM7IvUS5jZU3ITo=; b=WevNvz/zPcIEMRN6W/yKbTmda5UXquXRm+7fLzlXTbET8ho8TtYUP6LxaAEKzQYhPg K1FEyVUN0dUF4iX+FLG27WXI5F6gbTAQcFKXg/bzW+hArJVLte6ttSmJW7pVbDgCUhwC dL1AcWEhvJC0iMYrA3qi2dztSbVSZRpzeFFNYZbVnQG7Re7kQ5CdPpnKP9Wn60YS162n AKzH8Y+8IWg4g4izHRQ/eiBQoqafj/kNsOgv4dqckunQsyRF98TISa2FOKE/b+xJ1UXb Za0bB6SqLLmc4KitlGDw8HmNFvUJWCbPUFRSvvTy0wkFmAvEB7J99jo9WFwfE/DjL5Jd tOUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I0UanIPG; 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 m16-20020a170902f65000b00172bb36712fsi14466315plg.514.2022.09.06.10.07.36; Tue, 06 Sep 2022 10:07:48 -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=I0UanIPG; 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 S239425AbiIFRCa (ORCPT + 99 others); Tue, 6 Sep 2022 13:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbiIFRAc (ORCPT ); Tue, 6 Sep 2022 13:00:32 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 895245C9C2 for ; Tue, 6 Sep 2022 09:47:59 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id bj14so3080363wrb.12 for ; Tue, 06 Sep 2022 09:47:59 -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=wKElCC452+uQH9oPG73me3V/zKr0MM7IvUS5jZU3ITo=; b=I0UanIPG6cavD3RAbIQDu3/9sgsbVr9VIqgemy5st9ic9vxiBP9bkzOCx7iFf+FE4x 4/AosVO9pVb5R+zdmZbJXE0lXvjbWjMXOhf8Gmip81yCD/k1tkQoTrPhchA4ChmSilTS yKzGjOJzhtJhXnNE9F8xEK474N/iQqwQVMog+pRFwfTc4IHE813ArtxrRYdnKnyVYMB1 xet1IbKiJ8Uhd7behB4tHXSb2xzHbHcJ3hO15UPlZUA5GQs4pl7uwHYnwpSfSdpqigQP DnIL7IQg/vpg/sb/OLumy4wDL7GujMduAAa3qri2TTj7ZqqDwEfYzQeIZXBupaRj0DDz /USA== 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=wKElCC452+uQH9oPG73me3V/zKr0MM7IvUS5jZU3ITo=; b=yZr56OnDgFc/3/s0+FP17ELizmL7MsahH6P/MAXMpnhXXc7xYYCWyI/hUdIoe45upe RCryV+n1zV//wgN9uGA/gdbeWSCo47o6Q8F/Xgxg3pemK3xb9JFX080ejArvh7DAasI9 1mRrCwH9pepXhdGMjm3fsxL/3Rkgl8TiRNzOCpxX9BTsKC0ZnhhK8EeJkPzoi/Pbhvrq i56g10yOyxrWQtvjel2JEg/w2FziFLRa9JyzIWJEezbCt4P1Q8pF1vtYtrRMNvwvqQ45 odT9FcR3LpCjmXoUA9dp0w5ZT+6QeVEjNEmMBeEt68y6LtbjBOlwShf9yMefW6Aq2Nc1 n6CA== X-Gm-Message-State: ACgBeo2b0VpvyQn2KmwW9UgAtQo4aTZC6CWMVyfCX64pODfXweUUTPYS TefVrxDU+lOIbJNt1kctnM6zxw== X-Received: by 2002:adf:e109:0:b0:225:4ca5:80d5 with SMTP id t9-20020adfe109000000b002254ca580d5mr27574446wrz.465.1662482878837; Tue, 06 Sep 2022 09:47:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 09:47:58 -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 17/30] thermal/of: Remove of_thermal_get_ntrips() Date: Tue, 6 Sep 2022 18:47:07 +0200 Message-Id: <20220906164720.330701-18-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=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 The thermal OF code uses the generic trip points to initialize the thermal zone. Consequently thermal_zone_get_num_trips() can be used and the of_thermal_get_ntrips() is no longer needed. Remove it. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 5 ----- drivers/thermal/thermal_of.c | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 99a5d5281037..0139bc1e4f87 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -137,13 +137,8 @@ thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev, /* device tree support */ #ifdef CONFIG_THERMAL_OF -int of_thermal_get_ntrips(struct thermal_zone_device *); bool of_thermal_is_trip_valid(struct thermal_zone_device *, int); #else -static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz) -{ - return 0; -} static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) { diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 2f533fc94917..89afa59c4915 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -19,22 +19,6 @@ #include "thermal_core.h" -/** - * of_thermal_get_ntrips - function to export number of available trip - * points. - * @tz: pointer to a thermal zone - * - * This function is a globally visible wrapper to get number of trip points - * stored in the local struct __thermal_zone - * - * Return: number of available trip points, -ENODEV when data not available - */ -int of_thermal_get_ntrips(struct thermal_zone_device *tz) -{ - return tz->num_trips; -} -EXPORT_SYMBOL_GPL(of_thermal_get_ntrips); - /** * of_thermal_is_trip_valid - function to check if trip point is valid * -- 2.34.1