Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10949870rwp; Fri, 21 Jul 2023 07:14:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGxUMNmNgE5/0keNDJsAtSObxpiaVaVexHXyH9hnJIN9LRp1l2PIMHiiITgjdSiVeOUTDud X-Received: by 2002:a17:903:1cb:b0:1bb:3d05:764 with SMTP id e11-20020a17090301cb00b001bb3d050764mr3326107plh.32.1689948878827; Fri, 21 Jul 2023 07:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689948878; cv=none; d=google.com; s=arc-20160816; b=MJ0HUVRb+2UJlKE1dNVYqsKXOU0leu/Dmv2dHxhPffbPQ9hxssA5EcKQm9cVmtsy7C t7x2oNW68ewxl82qTLptS4dpL2d3vBeqZd3ZD5j6Z0MpzCnRbCYc9gf8jOyKP+Q5k6Xw 4GtXMti9S7FImEdPMIcZElAWrcIuEY2/RG+QflH/ajP1I6te8tAioO1fgbtyDsnJKY0E L59nucWoNwNAuqZTbyntYTfx3IyhAFqh2W6bLrZ1xa3hdykWoQRrYXTM8cwvFcrMIhW0 acsQU+wUP5X/Xbn+vwY8HMK9BEH9Hqg7S0cYB9cMq9Q93+eNQj9i7mIa5PGie8mrmPuO Faww== 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=VO8wPpvR9UC+oICpuCA0K9kTucZUE8IEb17/dzJSPjc=; fh=WAm0nkxw3rD71A4QzwJS1JiPPKRsyn91IiWMPsOrzoY=; b=FkaYR6jPiQEm8nmk8/Smuu8p960Ed1BpQl0Jpd7PyOh/vaEFR0cZzdgZyqW8DPYYP4 kBJtQ8ltf4e1sFnzN0Z5EAJg5XlKsQPY888YTE9LRVTxM2RbYKe9xzs5pYxPh5w9pVZv s3cwjBXqjg7m0jOAPiK/ELfeIw5vOKtqWDcEQBO8EVsRkPG2LD5tFwJct/rV5dmhlGRX kwgho2QoBvYr74OKlXG3y2q8L+rAL+C1Zp0UYlEdJFlGU98u6uJ8hFrZP1RivBkrHQgv UO/Qe0b4+d4v1YndRGm9+cX1UYaMUIs2lRnypPTx/kzUjXGbQVzr2Op2b5vjzvNTUZbQ JkcA== 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 b5-20020a170902650500b001b866e8af8dsi3143775plk.43.2023.07.21.07.14.25; Fri, 21 Jul 2023 07:14: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 S231723AbjGUOHa (ORCPT + 99 others); Fri, 21 Jul 2023 10:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231625AbjGUOH1 (ORCPT ); Fri, 21 Jul 2023 10:07:27 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A2B10A; Fri, 21 Jul 2023 07:07:23 -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 e3471599fb4ca902; Fri, 21 Jul 2023 16:07:22 +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 961476618ED; Fri, 21 Jul 2023 16:07:21 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Michal Wilczynski , Zhang Rui , Srinivas Pandruvada , Daniel Lezcano Subject: [PATCH v2 2/8] thermal: core: Do not handle trip points with invalid temperature Date: Fri, 21 Jul 2023 14:47:47 +0200 Message-ID: <2306949.ElGaqSPkdT@kreacher> In-Reply-To: <5710197.DvuYhMxLoT@kreacher> References: <13318886.uLZWGnKmhe@kreacher> <5710197.DvuYhMxLoT@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: gggruggvucftvghtrhhoucdtuddrgedviedrhedvgdeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeejpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhhitghhrghlrdifihhltgiihihnshhkihesihhnthgvlhdrtghomhdprhgt 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, RCVD_IN_DNSWL_BLOCKED,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 --- 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);