Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6347315rwb; Mon, 5 Dec 2022 11:00:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf5NJZcU0AKOS8TN0LY6HsNR2tsLLv6itADdBWsrhMtRsm3lg1o068rTMQZXBVo2FlsNP5JA X-Received: by 2002:a17:907:f8d:b0:7c0:edc9:c89e with SMTP id kb13-20020a1709070f8d00b007c0edc9c89emr5861496ejc.494.1670266829063; Mon, 05 Dec 2022 11:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670266829; cv=none; d=google.com; s=arc-20160816; b=yn/P5VyQ91UjMHFpNa3qaKLH3WXmYA2MkYhYsLj4MIjQQK8wNvAPZlkdIukkzSEq4o vFb8JXViC4V0/YcQWAKLx0hx/qw69N7RPTEr2lYKLAMTmZr/PovgATItZeY0WduW2IA5 GeY1qbaw+wNro+8ppB5cPGk0Vhh5E/cpXFvda+FyJ9os/FNcr/7VS5l80i2Wb85j7Hhc VcaZIcPLI6ULrNu7RbOiCLwbWpYswc8oQ2C18tJE7BY3d3s2pirr823BKa46DLAjmxpz LGIunWcK8nt3/hACUWE+o26r+HyRVtMIDrHbfrkZMc3yIVZwhNmgCyRI/BYf2QiqfplQ 44AA== 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 :message-id:date:subject:cc:to:from; bh=jut67/9BLZhhYa3TAMq3cFBx7bVgvwsTsa2z6yjRyPE=; b=G+/lQQgQK68YBc8ChTgBaDqO/JDf8o9abSV9zEkZrqWKkcDGG0YZGu/iOheJleuPRv 92sTc+1RVqPsp505990nKy9Ugf1T2LUsH2q72t2O8bJhhwEaaoHcg27mV9XvyO+ujSMw yArBOVvgDQ0SpfTtY+JZb/KyXb5CDjEIFmWA1Wq9orNi8Lilf9lJR9cwHRgEKZ2b6jjd vy3OK++Dr6jX4yom+NS/1fhKvBEv/6bgNPCqDuuYGAw+HOO37Ie6ekXsZwq45XmtZ9ZY drxbJw1SaMSS74k2pJFtDpFolv3DoG5kqxquOjeDvdVFeRtrMbYXJ/b+Dsc6lRd87rhL bhaA== 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 dr12-20020a170907720c00b0078dcf17c084si12079532ejc.728.2022.12.05.11.00.08; Mon, 05 Dec 2022 11:00:29 -0800 (PST) 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 S232762AbiLES4v (ORCPT + 80 others); Mon, 5 Dec 2022 13:56:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233496AbiLES4e (ORCPT ); Mon, 5 Dec 2022 13:56:34 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B10182228F; Mon, 5 Dec 2022 10:56:17 -0800 (PST) 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.1.0) id 9598059e2c2966bd; Mon, 5 Dec 2022 19:56:16 +0100 Received: from kreacher.localnet (unknown [213.134.188.181]) (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 7DF5A2801DDF; Mon, 5 Dec 2022 19:56:15 +0100 (CET) Authentication-Results: v370.home.net.pl; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: v370.home.net.pl; spf=fail smtp.mailfrom=rjwysocki.net From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Zhang Rui , Srinivas Pandruvada Subject: [PATCH] ACPI: thermal: Adjust critical.flags.valid check Date: Mon, 05 Dec 2022 19:56:14 +0100 Message-ID: <5883789.lOV4Wx5bFT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.188.181 X-CLIENT-HOSTNAME: 213.134.188.181 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggdduudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppedvudefrddufeegrddukeekrddukedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekkedrudekuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohep shhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 From: Rafael J. Wysocki It is not necessary to compare critical.flags.valid to 1 in acpi_thermal_trips_update() and doing so is also inconsistent with other similar checks in that code, so simply check if the flag is not 0 instead. No expected functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-pm/drivers/acpi/thermal.c =================================================================== --- linux-pm.orig/drivers/acpi/thermal.c +++ linux-pm/drivers/acpi/thermal.c @@ -291,7 +291,7 @@ static int acpi_thermal_trips_update(str "Found critical threshold [%lu]\n", tz->trips.critical.temperature); } - if (tz->trips.critical.flags.valid == 1) { + if (tz->trips.critical.flags.valid) { if (crt == -1) { tz->trips.critical.flags.valid = 0; } else if (crt > 0) {