From patchwork Tue Jul 25 12:06:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 125596 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2437915vqg; Tue, 25 Jul 2023 05:38:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlF+uyp/sB+LKyX2H3Z5Jbw/lMpEHJR41CSXayUOP5ULeVsrqJ9jjM+dBYKFaNFTc9J8JX1G X-Received: by 2002:a17:906:53cd:b0:992:4250:545b with SMTP id p13-20020a17090653cd00b009924250545bmr11798404ejo.47.1690288695987; Tue, 25 Jul 2023 05:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690288695; cv=none; d=google.com; s=arc-20160816; b=PL3LhBGK/djqYHM218htXqgKHhu+KMb2yQfeZ4hNIHtT3QddbNEDFB5hNdMSVoX8E1 jkZYPMyqAm/SzkEXsTWDv34YiK7Eqhv2KB0R7F9HGl7tRVNPdUQdib4kVbc3O2V31Wrd 83CyZthBuWUw3dv42HGFi3prYQRbKv49vE9LNMa4oEJYNGx8S/Mx/wXYC6tMlGqQtQgQ b9hwu9tQWFOteYCKObJt6LnPbXMNzhLXHl6Smy/Rxa9yL3GFumEPFeEZXKJIr5DPpRCZ 97yYoroGAbsiK9Ww5Kus+RIbQV3DdhYR+3zc85OMAk6ffdD1eZaV/Y5fEuiqdLVvXvub 77TA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a1709067e0c00b00992acfd27fesi7511861ejr.503.2023.07.25.05.37.51; Tue, 25 Jul 2023 05:38:15 -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 S233740AbjGYMZv (ORCPT + 99 others); Tue, 25 Jul 2023 08:25:51 -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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771784336627630697 X-GMAIL-MSGID: 1772396159803547296 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);