From patchwork Tue Feb 21 18:07:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 60204 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp151983wrd; Tue, 21 Feb 2023 10:11:07 -0800 (PST) X-Google-Smtp-Source: AK7set+X+iQkCv/pjfvP8zCS1EswuZ3g3Wqi8m8zLDfNy2dnxnKXGf2zpvUh03UAQz8eslSu+5YY X-Received: by 2002:a05:6a20:1585:b0:bf:a1c:3ff0 with SMTP id h5-20020a056a20158500b000bf0a1c3ff0mr5386135pzj.52.1677003067430; Tue, 21 Feb 2023 10:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677003067; cv=none; d=google.com; s=arc-20160816; b=gpKXC3wHH4ozsHTf3f2gjdLZGhb6BuS7ECzsPumUkAImkpV7imA9m3KmoWItae0uTq kGYDbOiABEOOQcNETlKQSzCzvVkMvc2Z5KsP6ntFgJm4aE3DGXBeXeiO/wmE0qO9D6/u YuqKJi+5o0cn/JKlbnSTY2ydK4H/UCIwr2x5Y7b71w1GiO1FWS9PXMJmKTKOFOBBBksl IT9MdvL3Kbw8+NVQvnR6hZTgaxB1Y0QCoKieZP41jweyY476MPw9CY6M4hAn3vsQOeo2 aY/LOBkeWYwzvkcdhFPVUwlZFOgD1utsKThhzPwsDg+T1kvVObWAxEkEEO1VEAzGpaz1 zmKA== 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=C2s/AS9OMV5i6t0w60QjnkUP8k7sKtqb93EMncEZug0=; b=Rz0fHNcrmKOhVVdnXsmhcKJp9Fde6SFI2AIguU6k1SjTMaCWD2+yoeHePbF1nQSDAk iVVsbcbrrj4kUwGGj3rG8wXwpCLrkwP0Y2lATEhBGUPNa1Ql9TUIOzLS1+jDUz9hVGvQ NYr3rpBzaNVwvetdeCO7QpwcQLia7SBMlm0HHTt8xg+VwC0MWAyBeOguc0zd9TiKb0Ng 3NVXeAb9NKsA9wwYcVvMSNHU3rxNhMj4iE/qZfJQafjJpu9h9N1cBZnsdgmE2R5pyBbZ H0SrR9A1i+Rmd8hKP38CFNIErwoyFkadhxXdXw4cVRqnVPJK9de2pbLEQkWe1HgOHHbu bzug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="STKCle/D"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u25-20020a056a00099900b0058dc3db12fasi5317957pfg.351.2023.02.21.10.10.53; Tue, 21 Feb 2023 10:11:07 -0800 (PST) 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="STKCle/D"; 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 S232724AbjBUSJs (ORCPT + 99 others); Tue, 21 Feb 2023 13:09:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231987AbjBUSI4 (ORCPT ); Tue, 21 Feb 2023 13:08:56 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A7CC2F7A3 for ; Tue, 21 Feb 2023 10:08:13 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id r7so5252249wrz.6 for ; Tue, 21 Feb 2023 10:08:12 -0800 (PST) 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 :message-id:reply-to; bh=C2s/AS9OMV5i6t0w60QjnkUP8k7sKtqb93EMncEZug0=; b=STKCle/D+aRO5/PsxpIOmpasqDliI5Jen3mltOo11WOsbh2h4xrWh78KFbbXDff28b ahz28JiXcfV3cyJGyVY5fNshkdmCxd/Rb1TaN1sheYQZTHrA5cCuT1ivlfxBKZbuJRAn DCVKLOPv6Oef78F9rzfY4OONy7zfF4LTblDBwHVVYc+dYAsMQ6j2RO+E8aRgaWJiXLKC 9Ud5WblKVT0Pen16kN1x8/mxVBkWmzZsHQRId6RGUnD+GaFXVt4B9wjyrUSqxDhGYv6M hWu0FJDD80qscl3m57xN7hNxBYNOqxrR68TlCc4CHoyEHdDuRbSMsw9LKs9ZVC8+vdau 6QFg== 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:message-id:reply-to; bh=C2s/AS9OMV5i6t0w60QjnkUP8k7sKtqb93EMncEZug0=; b=Hqxgsv08KlMWq1+Z3vfAGvNwwzelPJ2Wp1eYDbbG8xRvh/fI0f1CsPaxLOOeieR7BX t1tLefYwXJouJe+CBckGAIBcD6kCTtB8O+9FN/lw8jF6WVU0U2/JJQrdrKn4RbhM8dJ0 V1178UO2iLCKFz279fe1dyKkt4FgQ0LMYo/gaCBUSCs/xzmbNKeWZSekAz/I7fy+jJaw sLA2KNMOtxlC+cotzj6aTgVQf2yzLSSebg4H6UTUFu0XGM1hMbEAVEVGVCxztJjw1UYO WrzOsEPYRYBESvNRkW27/TUM7llhm0k5HrABRAzFG5U+9HQDzBrRq8ee4+f3dBKGrReJ WawQ== X-Gm-Message-State: AO0yUKWSrccH6NjN1K+UZd9pDSii4pyi6RwpBmROKAg2yK/dFa2iqNZh +7+zOvvJySAnFupuhRTKWNAiAw== X-Received: by 2002:a05:6000:14e:b0:2bf:dcdc:afb8 with SMTP id r14-20020a056000014e00b002bfdcdcafb8mr5182978wrx.64.1677002889369; Tue, 21 Feb 2023 10:08:09 -0800 (PST) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:1e9:315c:bb40:e382]) by smtp.gmail.com with ESMTPSA id c128-20020a1c3586000000b003e21558ee9dsm5107815wma.2.2023.02.21.10.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:08:09 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria , Zhang Rui , Thierry Reding , Jonathan Hunter , =?utf-8?q?Niklas_S=C3=B6derlund?= , Gregory Greenman , Martin Blumenstingl , Balsam CHIHI , linux-tegra@vger.kernel.org (open list:TEGRA ARCHITECTURE SUPPORT) Subject: [PATCH v2 13/16] thermal/tegra: Do not enable the thermal zone, it is already enabled Date: Tue, 21 Feb 2023 19:07:07 +0100 Message-Id: <20230221180710.2781027-14-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230221180710.2781027-1-daniel.lezcano@linaro.org> References: <20230221180710.2781027-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758465168859092216?= X-GMAIL-MSGID: =?utf-8?q?1758465168859092216?= The code enables the thermal zone after setting it up. But the thermal zone is already enabled by thermal_of_zone_register() function. Signed-off-by: Daniel Lezcano --- drivers/thermal/tegra/tegra30-tsensor.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c index 3506c3f3c474..e38902abf207 100644 --- a/drivers/thermal/tegra/tegra30-tsensor.c +++ b/drivers/thermal/tegra/tegra30-tsensor.c @@ -346,7 +346,7 @@ static int tegra_tsensor_enable_hw_channel(const struct tegra_tsensor *ts, { const struct tegra_tsensor_channel *tsc = &ts->ch[id]; struct thermal_zone_device *tzd = tsc->tzd; - int err, hot_trip = 0, crit_trip = 0; + int hot_trip = 0, crit_trip = 0; u32 val; if (!tzd) { @@ -401,12 +401,6 @@ static int tegra_tsensor_enable_hw_channel(const struct tegra_tsensor *ts, val |= FIELD_PREP(TSENSOR_SENSOR0_CONFIG0_INTR_THERMAL_RST_EN, 1); writel_relaxed(val, tsc->regs + TSENSOR_SENSOR0_CONFIG0); - err = thermal_zone_device_enable(tzd); - if (err) { - dev_err(ts->dev, "ch%u: failed to enable zone: %d\n", id, err); - return err; - } - return 0; }