From patchwork Sun Jun 4 12:13:33 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: 102980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2113270vqr; Sun, 4 Jun 2023 05:27:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51j/hQZrEkeJ35YWSmZwuSfftVnQCJm+uealFxQEny6EIiOQAdGFF/FIVBcXd73UJoorru X-Received: by 2002:a17:902:7146:b0:1b1:9e18:d409 with SMTP id u6-20020a170902714600b001b19e18d409mr4193553plm.39.1685881649701; Sun, 04 Jun 2023 05:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685881649; cv=none; d=google.com; s=arc-20160816; b=dnz+FxPRTmDhvCWxsL/CV9BKx2OE6OmjAqyvFCdNEJoRO9EWmFAjGIixaw8G+n5TNx c8sgVn3VzbQeWtEuW9GHoR5+hS27li+tqn3TKpxHX7XRMgJ71+q1x2bdfQIbHq/uFeU4 wtHpRTvxhATqNOf+h95nxbrdOcOeXwMrtzrb+NpBMIzcmVehPo2ucwzpH4NdHjnab8sy NV4FtgHhxIF6Pkqrs+M3T3TJR76wzwxLqt3WyOova4xqRFW8y0da5Af6Psvkyh0riXHM v3mJxXCTGEo0iT9Vi8yDwP5s5ORQPw9WNckTY5zBGnynQ6J/QdTMKvgv3rxoeqqd9fGz VVxg== 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=GyttWUhkTcV8CYWmKimoTS1AAehrQNwBHHKx0VlzXqU=; b=pQ3kTztEPlMygImQCLmb0f9tJy4JzkIyt8CbIsW0GfLqedwV4XPUuxBtmBC/l4ZlvK A7PTjdZriDhjOGhSWLLRfP3o87CamlWgaCYd/VlvMEpPM2JlahVhPcBizeszhvz7acBn ZLo4mU6Eiow3i+bHQt8wf/hF9jqwZqUGB6iUde0hU40xVniyosYv/ww/ZGf3eA2TaTwq pNi4+9sMUSt3psho7RhaQq3rJuYcxjr3MWhtoJnaTBCWSD4hnQU/wJMbrmw7ZuJBHQaM i+HqxUdh0nSk9LMdgILOkR0q47acislaURxyBIbUc8fYrVYBrAXYmokzejVSr/mLfQ0u ZIng== 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 d18-20020a170902aa9200b001aadd1e0384si3921590plr.192.2023.06.04.05.27.15; Sun, 04 Jun 2023 05:27:29 -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 S231162AbjFDMVr (ORCPT + 99 others); Sun, 4 Jun 2023 08:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230261AbjFDMV0 (ORCPT ); Sun, 4 Jun 2023 08:21:26 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70CA5C4; Sun, 4 Jun 2023 05:21:25 -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 34ad8baa40610553; Sun, 4 Jun 2023 14:21:24 +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 76F14963C55; Sun, 4 Jun 2023 14:21:23 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Zhang Rui , Daniel Lezcano , Michal Wilczynski , Srinivas Pandruvada Subject: [PATCH v2 2/7] ACPI: thermal: Drop redundant ACPI_TRIPS_REFRESH_DEVICES symbol Date: Sun, 04 Jun 2023 14:13:33 +0200 Message-ID: <13298027.uLZWGnKmhe@kreacher> In-Reply-To: <2703629.mvXUDI8C0e@kreacher> References: <2703629.mvXUDI8C0e@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: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeljedgheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepiedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrghdprhgtphhtthhopehm ihgthhgrlhdrfihilhgtiiihnhhskhhisehinhhtvghlrdgtohhmpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767775036680251984?= X-GMAIL-MSGID: =?utf-8?q?1767775036680251984?= From: Rafael J. Wysocki Drop the ACPI_TRIPS_REFRESH_DEVICES symbol which is redundant, because ACPI_TRIPS_DEVICES can be used directly instead of it without any drawbacks and rename the ACPI_TRIPS_REFRESH_THRESHOLDS to ACPI_TRIPS_THRESHOLDS to make the code a bit more consistent. While at it, fix up some formatting white space used in the symbol definitions. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Michal Wilczynski Reviewed-by: Daniel Lezcano --- v1 -> v2: Added R-by from Michal. --- drivers/acpi/thermal.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) Index: linux-pm/drivers/acpi/thermal.c =================================================================== --- linux-pm.orig/drivers/acpi/thermal.c +++ linux-pm/drivers/acpi/thermal.c @@ -238,12 +238,11 @@ static int acpi_thermal_set_cooling_mode #define ACPI_TRIPS_ACTIVE BIT(3) #define ACPI_TRIPS_DEVICES BIT(4) -#define ACPI_TRIPS_REFRESH_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE) -#define ACPI_TRIPS_REFRESH_DEVICES ACPI_TRIPS_DEVICES +#define ACPI_TRIPS_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE) -#define ACPI_TRIPS_INIT (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \ - ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \ - ACPI_TRIPS_DEVICES) +#define ACPI_TRIPS_INIT (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \ + ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \ + ACPI_TRIPS_DEVICES) /* * This exception is thrown out in two cases: @@ -906,13 +905,13 @@ static void acpi_thermal_notify(struct a acpi_queue_thermal_check(tz); break; case ACPI_THERMAL_NOTIFY_THRESHOLDS: - acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS); + acpi_thermal_trips_update(tz, ACPI_TRIPS_THRESHOLDS); acpi_queue_thermal_check(tz); acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, 0); break; case ACPI_THERMAL_NOTIFY_DEVICES: - acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES); + acpi_thermal_trips_update(tz, ACPI_TRIPS_DEVICES); acpi_queue_thermal_check(tz); acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, 0);