Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7222677rwp; Tue, 18 Jul 2023 11:54:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlEyPbQWupaWBvl9UHqaKEzdr6EeJDuRAPT1NAYZ2ad9U0XXf+l+grcmmyWP+MsLUM9doH7Z X-Received: by 2002:a17:90a:c84:b0:263:5c30:2cf8 with SMTP id v4-20020a17090a0c8400b002635c302cf8mr128999pja.0.1689706453595; Tue, 18 Jul 2023 11:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689706453; cv=none; d=google.com; s=arc-20160816; b=JF9RFsm+kTCN+iWuG1xQW3o04dJeay7RTganx5k9kVz2xxxAQhEPJYBxLNcHZyeu4j LH9Mc/l8gx+lB4sTQSioJJrQEdF4xUlO+FXNcNrs3qwmknry1ihQFbM0WD7O6/GvewJ6 pSo3wSdoGeS/2AxYigPLgY6cCqBmqXUG3d/2wBklGnd/R1Swrr8eSE3xBPB3wmmZ+7Tw K5cgS/F8ut7AFqBf0ZUo3ADMzF754ZJ3jHTdtc98oVC4ohnBo2lEwh5IXDonUn418UA+ 5LHaqPfzEj3r15Ww+J9C4gYxYMbMcjRbkUlzwlC74biUA/Ot/0YaBbZTBzpOiQP1DWeo OIKQ== 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=OpmANtxRmdClqfHjG/Mp6wbjzTgcfiB54axzbup9/zM=; fh=WAm0nkxw3rD71A4QzwJS1JiPPKRsyn91IiWMPsOrzoY=; b=hXNK+nS9Z8ckE5VeEf4koXsBqT9vA6x0cHhX8e5nXYqzRRO9QuobpLE8+OTW/aUzFb foKcSxFxZqWjziHd9hirF/fZipjTHCuMsTZOn+ZxIvDi3hORKjgrdlQeIQ+3FzknVd9S 9/0eo6tIQxklUAwOLsB2zKZffJU6BF9Tpc2Kv90sislmemra5APGcjLDps+vysaAcgKi fIosj/ezOlhBqIhlWjzqBAyNXVoHCzKI+YRblidHNGAnvkSsM+e7glcB5+YYsMlYwYnv RIiJO5cFiFHnfiSsQSQJEc5Ps5hLLLxmqUAAAaakdLi3kBrlSeYHMh63fRtDJU/AWvOn MK6w== 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 n11-20020a170902d2cb00b001b9e2ce5723si2151887plc.495.2023.07.18.11.54.01; Tue, 18 Jul 2023 11:54:13 -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 S229838AbjGRSVu (ORCPT + 99 others); Tue, 18 Jul 2023 14:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbjGRSVg (ORCPT ); Tue, 18 Jul 2023 14:21:36 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0647D1A6; Tue, 18 Jul 2023 11:21:28 -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 8c288c8573e8aed4; Tue, 18 Jul 2023 20:21:27 +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 D76BB6614F7; Tue, 18 Jul 2023 20:21:26 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Michal Wilczynski , Zhang Rui , Srinivas Pandruvada , Daniel Lezcano Subject: [PATCH v1 2/7] thermal: core: Do not handle trip points with invalid temperature Date: Tue, 18 Jul 2023 20:04:24 +0200 Message-ID: <8256591.T7Z3S40VBb@kreacher> In-Reply-To: <13318886.uLZWGnKmhe@kreacher> References: <13318886.uLZWGnKmhe@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: gggruggvucftvghtrhhoucdtuddrgedviedrgeeggdduvddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehmihgthhgrlhdrfihilhgtiiihnhhskhhisehinhhtvghlrdgtohhmpdhr tghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm 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 --- 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);