Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1788442iog; Thu, 16 Jun 2022 13:58:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u4aeQRyag2Df7sY5ENFLQXKkJLUq/mP8zuX+eIzZ/SFqM6bGAS7+uBecCK4gkD9uBcAOkG X-Received: by 2002:a17:906:5393:b0:711:ca9c:5589 with SMTP id g19-20020a170906539300b00711ca9c5589mr6251069ejo.350.1655413118842; Thu, 16 Jun 2022 13:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655413118; cv=none; d=google.com; s=arc-20160816; b=M9BAWo8B3yv8yyS9FwzwVb/mBP0aiOP1wlUZ04P4YYw/WlFzdRU6keYgH7204Ne4dV 9w6LK3Z6+cmbDmAhXJgkCXd1YAWrVkQHeXILp6vPyofTtDvLbq1YJ3A6zl/4I4GmVWt1 85KzX66gZ/Oi4OdFPrxiPceYbca6RW1X4SUmf75WaYqM5CYuiZE/qwtmTQ03khkRGyfO LR7wU6MCAyBfrdrau8CG0On9ZMlEGB5OKtz4OtwkU60UaGSlfIERKMoms/U53/dpy3uk ugbd6J+v/hIXKffZj1zRgSbrILlXVQWzBJ5nnlzHCwp0RaPc/x3e5xyEfwK0S+vIYv5u lXog== 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=5oDf6mmYoYGsoU0I4zvpHX1oZdig110uWrdCKfJ96DM=; b=AArY9DpPoQZZTqBCISu3361Ox1gXef90VPctl84kgnwO2uX3jxFDaDhT8UHZ5TaoUJ qcvPkK1qRSL+FKYmjhzlesY4HAgfXDaoRfic3mL6V3mtqx7iZQ3Xq7akAxUZ1jICH7pX jNkJwdaX1Fc8FZoLRAfCdMr8+3DZLqqxmsLW/rDUUpS9mxu81JqUrzOL7/X/H36Sv6e+ So49LLY9Z8tCmY2dz/fS8psbTn4grZPGLOIPPxGbpGfrx4NbwdGpyRuHuRIb4rWzQDu+ 0h4gg4vqx1sh9s2ypuRWpKPbv04nY5bdUrFKdQqeLHN8dsdxfX8dEhCucHWRRUpSdH4S 1cDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K99w/XO1"; 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 gs8-20020a1709072d0800b006fe89c9ef8csi3022956ejc.764.2022.06.16.13.58.12; Thu, 16 Jun 2022 13:58:38 -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="K99w/XO1"; 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 S1378634AbiFPU0M (ORCPT + 99 others); Thu, 16 Jun 2022 16:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378652AbiFPU0F (ORCPT ); Thu, 16 Jun 2022 16:26:05 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 772FD5D659 for ; Thu, 16 Jun 2022 13:26:01 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id i64so2427558pfc.8 for ; Thu, 16 Jun 2022 13:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5oDf6mmYoYGsoU0I4zvpHX1oZdig110uWrdCKfJ96DM=; b=K99w/XO1zGTWG5p0b5wFgtUWUOrT4YwqNbDgdD+6s2ht7eTgzVqqrKb+qDfipid6VQ RCHPEPQvKgRu89Ze62rJQ1UbzvDUahENV93wf2/zIl3EZr2EwYebUMbDfhcHHtwMxn54 yWG+RztQTZWP18/pZOwTKwIEVyvQqqDWHeN2wepOyjFGminVWFS4lis144PUC/G0HrfY McR9vxFmPBSSjCskeK0AkbUeMrwmNcpNHFMPu2lOxNEvqnG6c8zaytTME3PRyMm6rntk TnpKsz/uWs22nRtsTU6s7dfe91x9y+pzUQ4MYKaBAn/gbZPrEYvWRwK2qvTpAHxEDeDb TZng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5oDf6mmYoYGsoU0I4zvpHX1oZdig110uWrdCKfJ96DM=; b=Zs8wtCGYa2znvmOPsJPvxDLVhz/uQvCM7FbhMLAWrtZEbl4qT9H7n4qDN6z0WveHp9 mSYyCiRgRRpaNJgpHArRBHtNwV/2TefGGqy7B/0Jha1Zcl+/vvhOIPDkBXJQ5D3+n1cn CAiH/+sf0cqhxseELHQ29yBgaYN3U26zJrY3z7v6obCC5+Pf+CVL568n64DCv3qskTfM nBPR0F0EgHXCE2FmM/ysl3alCTDWdjZEDfe1g5uUAZ6FALuDCjGEE3W7NGS1VA9t1Pxc 7+RpJ8mqW9RRnBRKieoAEhff3hS29L+KthPAJle29G/7axPgnPHo2IjRp3tcTopa9g88 6I7w== X-Gm-Message-State: AJIora8jQRr1gxDhjUCUSiw+5A3MlHSx7hJfiehytEFn8ZUPg2DF7zkT vE3nEiXbIuFIaPXvZzA3LG265A== X-Received: by 2002:a63:5b04:0:b0:3fc:61a1:da0d with SMTP id p4-20020a635b04000000b003fc61a1da0dmr5910643pgb.177.1655411160331; Thu, 16 Jun 2022 13:26:00 -0700 (PDT) Received: from mai.imgcgcw.net ([192.77.111.2]) by smtp.gmail.com with ESMTPSA id a5-20020aa79705000000b0051bb0be7109sm2182960pfg.78.2022.06.16.13.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 13:25: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 , Thierry Reding , Jonathan Hunter , Dmitry Osipenko , linux-tegra@vger.kernel.org (open list:TEGRA ARCHITECTURE SUPPORT) Subject: [PATCH 2/3] thermal/drivers/tegra: Remove get_trend function Date: Thu, 16 Jun 2022 22:25:36 +0200 Message-Id: <20220616202537.303655-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616202537.303655-1-daniel.lezcano@linaro.org> References: <20220616202537.303655-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 The get_trend function does already what the generic framework does. Remove it. Signed-off-by: Daniel Lezcano --- drivers/thermal/tegra/soctherm.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 210325f92559..825eab526619 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -633,37 +633,6 @@ static int tegra_thermctl_set_trip_temp(void *data, int trip, int temp) return 0; } -static int tegra_thermctl_get_trend(void *data, int trip, - enum thermal_trend *trend) -{ - struct tegra_thermctl_zone *zone = data; - struct thermal_zone_device *tz = zone->tz; - int trip_temp, temp, last_temp, ret; - - if (!tz) - return -EINVAL; - - ret = tz->ops->get_trip_temp(zone->tz, trip, &trip_temp); - if (ret) - return ret; - - temp = READ_ONCE(tz->temperature); - last_temp = READ_ONCE(tz->last_temperature); - - if (temp > trip_temp) { - if (temp >= last_temp) - *trend = THERMAL_TREND_RAISING; - else - *trend = THERMAL_TREND_STABLE; - } else if (temp < trip_temp) { - *trend = THERMAL_TREND_DROPPING; - } else { - *trend = THERMAL_TREND_STABLE; - } - - return 0; -} - static void thermal_irq_enable(struct tegra_thermctl_zone *zn) { u32 r; @@ -716,7 +685,6 @@ static int tegra_thermctl_set_trips(void *data, int lo, int hi) static const struct thermal_zone_of_device_ops tegra_of_thermal_ops = { .get_temp = tegra_thermctl_get_temp, .set_trip_temp = tegra_thermctl_set_trip_temp, - .get_trend = tegra_thermctl_get_trend, .set_trips = tegra_thermctl_set_trips, }; -- 2.25.1