Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3751925iog; Tue, 28 Jun 2022 01:54:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t/5vA7qzE2jP101DV5wiMkwUWLPj9KfWXnqzBE7sznBb0ArHuKmc8yE9wtsEoy0fBhTKCP X-Received: by 2002:aa7:91cd:0:b0:525:63e5:9690 with SMTP id z13-20020aa791cd000000b0052563e59690mr3660959pfa.1.1656406456271; Tue, 28 Jun 2022 01:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656406456; cv=none; d=google.com; s=arc-20160816; b=ejpzefyEWyDfjMepCCFYj7JsD+FQyfbzsQNB3rR1rpUbxpmUSVxeF40U7UxwKFGjx6 0KB4BDLQluSBHS8B736uD5+ZS5fPSaOp4R8wzMmvgSQqoIiOTwmhRyx2Px6rvug4n+Rf m/lPHqiH/9TAu08kZDeeeEbY9iWpYpfq6iDjyhEnb68eBbizoNDWbOP7Uw4AuT/AUmxF MDObIg6uBBOQJLoECQR/hxW+1u4Qh0Q7OZdbHRpPYhr48gEFz1dFMv4+MntgtJ4I5Xv5 oAueplKoUOFWb8UXOpOqTx/e3Ht/fjL68EI4bjoWBAccp1aq0evfgh83ocO3pF1Glhqf HhgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=v5dmV6m+y35m/OOgFUolVoYy95Ck77s85Hp4iBdnIEo=; b=Bc1aGHOnYE1CGhhn/3BkcaKrQHRoDGDtGqQYVg63XGGtcRuWipK1NUZAPfCciSXrY1 r9vOd5doiSrfth4h6rzQMawuUe2Av6WHIFJfiSOZDLk7KbepOZOiWaHaNFfXbdbvrWxu BTjJGsQ5EZmhrSex0su3iQn1UpZu8Z6fyMxHgpsKSebRWCbj6lnXw7HMwmDGQ1w9zYeQ Q7aTtooqDjjYr4UrECpGuLcDpmHwm1ysxxDqhjqnVdzjoQ1NRTOGMegLXxnD+C578qsQ G/8OHi+3S00Oa1YJJ0D4zxSX5U+YGOcGDphzPSiMB6OYakLI9cnPcck52QCcebiOfzea dLiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F59o5Kjs; 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 f131-20020a636a89000000b0040cf84add25si17064808pgc.878.2022.06.28.01.54.03; Tue, 28 Jun 2022 01:54:16 -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=F59o5Kjs; 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 S1343986AbiF1Il7 (ORCPT + 99 others); Tue, 28 Jun 2022 04:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343939AbiF1Il5 (ORCPT ); Tue, 28 Jun 2022 04:41:57 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC442C679 for ; Tue, 28 Jun 2022 01:41:56 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id q9so16573717wrd.8 for ; Tue, 28 Jun 2022 01:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=v5dmV6m+y35m/OOgFUolVoYy95Ck77s85Hp4iBdnIEo=; b=F59o5KjsPbQpgausMMqrm8CVGniwLPIxLhXpdIPg9kElTHzRRtcS6rV+FaKbuAUzQL oam7mbVakexhVRbbFdHeg077hpaHbcaLLVqdf0tjINnn2Mn08k7UONIG8ZoYayHqk1cW LG5tsALv7W0EizWuYg4Ud3aiFLXf1vYFUiy/WOd6pV3qw+O8SKpOMQPw7xV15t5506mi oSa/dXScRlfrJRpbx3DP0BrlWUqXj2WXz4RNasGblvmzDZVoT1MXJK0XXT89FMNdJ6gA OV0kleLs3VQn34z57rAFaUzh3vhWavHUp0NxOTsAgXvPwKbeJHrXNnaRD+5UO8ZaA5Lf M15w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=v5dmV6m+y35m/OOgFUolVoYy95Ck77s85Hp4iBdnIEo=; b=LWmPqgOKGyCOgi9c1vYURbTqH0bU8QV8fyY4eoXHHA2u51vujZt0jc7TEAkKK3Ix63 g6hBkMUNjSGQQX6qQwMYzgsoOnIHbF0fDkSGelhztXsz1v9Qnu6VWmYuprWv3gOqHAG4 f1XBUvdZLjkfksS0HQO8UBvMdvJ/Tfk/n7ruUVpZI+bYmoy3kuBL4wnPJjWsfZhURf8x uC8KScamn4hg4esjltS8pvoNCDBNh7CmABDRcMQQRqPiA3BrR3I/XBrTsJE4RB0v5tYU 6DcQ4Ac5b7ia+a8pK68JHNzeqY3RyeRfjbXwTm2zd0aqZ4TmNTpAxX92j3XIr/NahZSV qXgw== X-Gm-Message-State: AJIora/Irb0lkjfnl0CZnxcC/1f6cicLFfThigFJ8dRK/Eg9UVoK/tsn 6GwM7VP4mQUwU8RnbxBvm/t5OA== X-Received: by 2002:a5d:5887:0:b0:21b:ca70:f60d with SMTP id n7-20020a5d5887000000b0021bca70f60dmr11370211wrf.32.1656405714610; Tue, 28 Jun 2022 01:41:54 -0700 (PDT) Received: from [192.168.10.46] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id z4-20020adfd0c4000000b0021bbf6687b1sm11098476wrh.81.2022.06.28.01.41.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 01:41:54 -0700 (PDT) Message-ID: <7841a809-e180-70d2-df9b-b30b411647ce@linaro.org> Date: Tue, 28 Jun 2022 10:41:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 2/3] thermal/drivers/tegra: Remove get_trend function Content-Language: en-US To: rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Amit Kucheria , Zhang Rui , Thierry Reding , Jonathan Hunter , Dmitry Osipenko , "open list:TEGRA ARCHITECTURE SUPPORT" References: <20220616202537.303655-1-daniel.lezcano@linaro.org> <20220616202537.303655-2-daniel.lezcano@linaro.org> From: Daniel Lezcano In-Reply-To: <20220616202537.303655-2-daniel.lezcano@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed 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,NICE_REPLY_A,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 Thierry, Dmitry, are fine with this patch? Thanks -- Daniel On 16/06/2022 22:25, Daniel Lezcano wrote: > 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, > }; > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog