From patchwork Fri Aug 4 21:00:22 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: 131376 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp119184vqr; Fri, 4 Aug 2023 14:52:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+lzZx5GYijrRU6qX3FOBZg/+upIb0PUKtD4LB7+0GU6Z2+RHF+SQtwQb6odMw2lGqM3Eb X-Received: by 2002:a17:906:3052:b0:99c:5056:4e31 with SMTP id d18-20020a170906305200b0099c50564e31mr922370ejd.15.1691185938995; Fri, 04 Aug 2023 14:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691185938; cv=none; d=google.com; s=arc-20160816; b=rf6oAbBt4TQnI0Myc6YFRoDK5f3aMqLAwx+cEodixz0NQsdH/TNRprfDI3lM9wrH20 mEahmb7T1Tl7Wrwvh/5LZvuWzuTjFrnAXwxgjPHNWSlPJR3bvSj0o6ZM4EfkHNknKKoi T8mUfu1O6bSQUunxCnJdtXB6an+9nxolbixLpmwvK77vcK++JGAE4WOXoQ89ggoCnvE3 INX7GPf2T/AfE55DIUUg2s9jGWG7E0HLoHELFsOuJdaKkfvSpjPvN9lKG6dfcX3uu6Yc vSoDSsJ/VeWoeSsc+X2q5LXksI1fs7ZNEUlypTEqMfTpE+m16oNNT8z9v4H4fc3oGk5t S+Wg== 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=T0xvm0KE0jwiBvoXLCFCeB7sa2tOPqhijyN43fdkY4c=; fh=jABj5v2rHKw019HO9Ag6891M+lPZ6d+O4eAkd8el8mQ=; b=ndEgRmoAn6/0OtvQciyF64PRDGuneyHIFBezvq+knD7sseFv6iau4Yg1FGp7Zh82Dz AvXhWKC2+fSUDl3hD7y0jhyV3pK7H9z5kclabwwSEheZzCrA9+/Zkl0O3PBEkO8maSNo uzxVO3Lzm/LCdwwI+SFK3w8D7i/0ZMKfmcwlOsUlY3uuHF5NuhEMDGatyOxWwMog8CD2 X/0Ck4FYHkL0G+lBVb1Bxq6prccwUcUO6PkIYgjCTWBr1h1L0IoFMlsvrfJO5LvOUzhG BOECTfoek0/uuaHE2cLQAXSANbVYQbOa8dsnsWA7yjCp9qB2JtPtjwEXM+lZrhTThZB8 vaUA== 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 t26-20020a170906a11a00b0099b633adf35si508487ejy.454.2023.08.04.14.51.55; Fri, 04 Aug 2023 14:52:18 -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 S229671AbjHDV0g (ORCPT + 99 others); Fri, 4 Aug 2023 17:26:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbjHDV0Q (ORCPT ); Fri, 4 Aug 2023 17:26:16 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D2514C3B; Fri, 4 Aug 2023 14:26:12 -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 a6286e61ff4363f4; Fri, 4 Aug 2023 23:26:11 +0200 Authentication-Results: v370.home.net.pl; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=rjwysocki.net (client-ip=195.136.19.94; helo=[195.136.19.94]; envelope-from=rjw@rjwysocki.net; receiver=) 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 BAA3D6624B9; Fri, 4 Aug 2023 23:26:10 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Daniel Lezcano Cc: LKML , Linux PM , Michal Wilczynski , Zhang Rui , Srinivas Pandruvada Subject: [PATCH v4 01/10] thermal: core: Do not handle trip points with invalid temperature Date: Fri, 04 Aug 2023 23:00:22 +0200 Message-ID: <4850902.GXAFRqVoOG@kreacher> In-Reply-To: <4878513.31r3eYUQgx@kreacher> References: <13318886.uLZWGnKmhe@kreacher> <4878513.31r3eYUQgx@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: gggruggvucftvghtrhhoucdtuddrgedviedrkeeggdduheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghp thhtohepmhhitghhrghlrdifihhltgiihihnshhkihesihhnthgvlhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhm 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 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: 1773336987627947779 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 Acked-by: Daniel Lezcano --- v3 -> v4: No changes. 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);