Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4397159rwo; Tue, 25 Jul 2023 05:40:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlFRFun/nwjC3Mk+ecoZ5cWpP+qBUJt/Lmg+bimkf0kftyEjCxXTV3sF9rGv3AiFykq/3h2D X-Received: by 2002:a50:ee07:0:b0:521:a4bb:374f with SMTP id g7-20020a50ee07000000b00521a4bb374fmr11013716eds.5.1690288838447; Tue, 25 Jul 2023 05:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690288838; cv=none; d=google.com; s=arc-20160816; b=EjYfstjn4c98KNpFE2G+FSOeybRfxA+th6ru6Foi/J8WcfKsP/qEDtFktE/SvZ0KIh FsmoR3Bn274ns4RvsyMTPjAVi6l995j35MB+ZnuJRi5b4WR8tB354K99aeHvUENhVPY4 lnxlCuRT13PL6RzFfzmPnCpWSxqDVP1IhiBm7M40whcJ0ujpOL1WQwCy/xdkHACa832c jnkK0ClUg9BEPFiIQq4Ht/7XwqTlHNxHiHjP1+9zIgFeyQOQGFu0UKeB7JeWQ8CdMye+ THs2Wz9u7SGPTinnQOz/Ho9svDG+bFvZcDJEQ7oUPYh6FIVQCvtXxw9Qb50hdqXeilgP vp9w== 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; bh=UlzE9h2FJjGQdsrK13CUt8ylwMOnv1m1WHR8T55ZYTc=; fh=WAm0nkxw3rD71A4QzwJS1JiPPKRsyn91IiWMPsOrzoY=; b=IFFv9UxGLMMO9fDXJJGIIwb1AjCoC8NLNKC0HXDZ/3fecJXejsYRT3AJkFzNQgrZgY O606ZDowL1rO5K0xJ2wRXC4ZsXksj1MEdRt7l7OdX5iXaUGeDT7MzQKx+Uk+R6Zxis82 tMPod3nk8UqvTAByLBZI3IANEDtTHvprkeMPkpP1LfWMMUrlfJlEMRIKK5bW4Hj6LopA XiXnmWzTS/y3REE5roLxddN5xba6W9irXvLyV5zADO7a5V+TNCFEN2zHnha+AAp0ubAf NzWa0TvOczj1VkQVK2cScVL8PfAOcU+aY5wP2dxV/bEs0SzhsvU4QoZUsUHOPsY0Y6R9 HWEw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m24-20020a170906235800b009893fe84e74si8199775eja.484.2023.07.25.05.40.14; Tue, 25 Jul 2023 05:40: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233639AbjGYMZu (ORCPT + 99 others); Tue, 25 Jul 2023 08:25:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233506AbjGYMZe (ORCPT ); Tue, 25 Jul 2023 08:25:34 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CB6710FA; Tue, 25 Jul 2023 05:25:33 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.2.0) id 1d287a6242350abc; Tue, 25 Jul 2023 14:25:32 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 804B1661B0E; Tue, 25 Jul 2023 14:25:31 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Michal Wilczynski , Zhang Rui , Srinivas Pandruvada , Daniel Lezcano Subject: [PATCH v3 2/8] thermal: core: Do not handle trip points with invalid temperature Date: Tue, 25 Jul 2023 14:06:13 +0200 Message-ID: <4822145.GXAFRqVoOG@kreacher> In-Reply-To: <12254967.O9o76ZdvQC@kreacher> References: <13318886.uLZWGnKmhe@kreacher> <12254967.O9o76ZdvQC@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedriedtgdehtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeejpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhhitghhrghlrdifihhltgiihihnshhkihesihhnthgvlhdrtghomhdprhgt phhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 From: Rafael J. Wysocki Trip points with temperature set to THERMAL_TEMP_INVALID are as good as disabled, so make handle_thermal_trip() ignore them. Signed-off-by: Rafael J. Wysocki --- v2 -> v3: No changes. v1 -> v2: No changes. --- drivers/thermal/thermal_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-pm/drivers/thermal/thermal_core.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.c +++ linux-pm/drivers/thermal/thermal_core.c @@ -348,7 +348,8 @@ static void handle_thermal_trip(struct t struct thermal_trip trip; /* Ignore disabled trip points */ - if (test_bit(trip_id, &tz->trips_disabled)) + if (test_bit(trip_id, &tz->trips_disabled) || + trip.temperature == THERMAL_TEMP_INVALID) return; __thermal_zone_get_trip(tz, trip_id, &trip);