From patchwork Mon Aug 7 18:01:24 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: 132323 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1644435vqr; Mon, 7 Aug 2023 11:54:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFToyNx8HJUc0mms7dVpgzq8IKNb6U6UbZcZNOOILrlabETQHMkILmVrTbFmPX7B9qpK3Re X-Received: by 2002:a17:907:160e:b0:993:da5f:5a9b with SMTP id hb14-20020a170907160e00b00993da5f5a9bmr9676890ejc.8.1691434452329; Mon, 07 Aug 2023 11:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691434452; cv=none; d=google.com; s=arc-20160816; b=Mn8qhh3hSGiIUkiokxdgtHh9PWFN+b5J+BSdou3zfcmTueGLBREU878Mz7N9cI+ZLo 8UWcsxh3uBvfnQd+LyZ0frK9YH2CExSfGmP1mh2r3iV7o5RXasly5x9SJsUu9Dt9Z/UA CXXdBlg7MUnlcsmzhwHtmOmMC/Ii9A21mAU+yASOw68o4FE2FBMxdDujxNs3qAT6kQwS p2GTwbT0fBuuXvhzvfg3Rd9RWjC71LtN7epwOm7UgATZy/eLm9NmTZ/whp3yaivIwkCr Z+W7ndg3Rtp3eSM0V+RgeyZIkhGOk+pIm9LLQH4k/Ua8OPbIFO+U/PkPaS8Bzw0vU8Vb nZTQ== 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=BXnP9uTp5VU1dfudXe+SCxxVBLcuhi7TZZsUlEMsKAc=; fh=jABj5v2rHKw019HO9Ag6891M+lPZ6d+O4eAkd8el8mQ=; b=bsTcxCniAWNeraXN8IYLTLKa5u/Ex1B6ZNe+YoBbUl2jihzJmQNYphg2b3vm7V5iFI 1Hg+Lac14tsXxXEP4QAVb7MHrU/ypbupWQwJ2hDC0BvaVx7LLFsCTJMLzCh+tolfuJqy sxzh7M73NGSDUWIyp1CAEmsgQtlL3vejgNG8hSF1OcaE7on3FSxIx+2ZIO7hcdWuveVA clLsgs+CqCKpG1Dpr8U51zB+g8o/hhdh/MSYZlIGTg8L7/gpYpXa1F9dvJ2SytEEoMMJ /r+yTdFq7gyPGm+It4j6d/BxAtdCdYpS5mJNMFfIekijeWO7w9RM4XK0iKfxO/H2+FMi Wzww== 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 n8-20020a1709067b4800b00992b63c9c16si5896062ejo.129.2023.08.07.11.53.48; Mon, 07 Aug 2023 11:54:12 -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 S231920AbjHGSVh (ORCPT + 99 others); Mon, 7 Aug 2023 14:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231222AbjHGSVG (ORCPT ); Mon, 7 Aug 2023 14:21:06 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4665010FF; Mon, 7 Aug 2023 11:21:03 -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 ece2375058cdbf73; Mon, 7 Aug 2023 20:21:01 +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 DE75E6625B2; Mon, 7 Aug 2023 20:21:00 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Daniel Lezcano Cc: LKML , Linux PM , Michal Wilczynski , Zhang Rui , Srinivas Pandruvada Subject: [PATCH v5 01/11] thermal: core: Do not handle trip points with invalid temperature Date: Mon, 07 Aug 2023 20:01:24 +0200 Message-ID: <4824219.GXAFRqVoOG@kreacher> In-Reply-To: <4503814.LvFx2qVVIh@kreacher> References: <13318886.uLZWGnKmhe@kreacher> <4503814.LvFx2qVVIh@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: gggruggvucftvghtrhhoucdtuddrgedviedrledtgdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepjedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghp 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: 1773597572089416359 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 --- v4 -> v5: ACK from Daniel. 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);