From patchwork Tue May 30 15:44:21 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: 100954 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2280241vqr; Tue, 30 May 2023 08:51:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5w6tcC/74K+ROSX1h82IF2NJ7eolGhi4Z+F1IlhTiwaPkXPyBT5Doj1/Yrlor54Al6tTS7 X-Received: by 2002:a17:903:1c1:b0:1ae:7042:b169 with SMTP id e1-20020a17090301c100b001ae7042b169mr3490874plh.30.1685461881090; Tue, 30 May 2023 08:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685461881; cv=none; d=google.com; s=arc-20160816; b=wBpZe2aDbxDFXCNUEW1KXWPOw7tCtWqyeDEJpPNoes3zVWz/3FS/kbS9AM4c/wEkDF rXf1G8Qz5AXOhaaVVf5EiO13y1xEW7y9vEM7CJYT3/0nLri7F+7Rj1RnSpDBR06VPALm Op35/3IfoIUsaL8wQmNVBVJnjtT3RPPw3ZaODtn+Un3RR3+Liy0paKQj02kKWAE+V29C xfD4dLx8kZJ14GTxCNPGt6Z1gtlAb2FU6mIaH9weSCvl/UYiZXjmKoX5o48/P9rGJHo0 jR4Y5AN0m8bd1qyOcDy/vWif81ehXXIQm1PBQ9l/HPstfvRXht/FCiVWpmbOTo90jGgj He4Q== 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=VjFwlavokN0wZlyhTE9iOcrimYq91EamaqxEcFW9XzE=; b=h6aTfewZYxsVI25/ubJwyW1f6h2zJtV9wvcySatTWGNlyy+ZRRMJDvfZftf2/r3jWa SfEevI5fLsO+HvfQyMde7n8QbWspxULP5lRxc9pdX+DelS2UZjZq1cd++tA1+2xQK/dJ fwIwPWiO7i+2V/xSdWb2Fy8RwrWocjt6FiAtI2uZl7JJ3aYDA8SyX41y8ukr7BQDeVFt 50NjWIdous0N7Dvrv8fs/Hcnc/NHunQ07Xw8h9PEdEnxw5mObeMRz1A16Qs3k8q+KSzG EGB7H9iKsSPgdSwnFW4EnZABeFYL4dWD4h7KMCNb2v3SaEf20YCJco2nmzAQpXa4dupB VsQw== 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 bi2-20020a170902bf0200b001ac360597e7si11187362plb.220.2023.05.30.08.51.09; Tue, 30 May 2023 08:51:21 -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 S232417AbjE3PqK (ORCPT + 99 others); Tue, 30 May 2023 11:46:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231736AbjE3PqF (ORCPT ); Tue, 30 May 2023 11:46:05 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53D34EC; Tue, 30 May 2023 08:46:02 -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 6c2c6a71edbb085d; Tue, 30 May 2023 17:46:00 +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 357E18BB094; Tue, 30 May 2023 17:46:00 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Zhang Rui , Daniel Lezcano , Michal Wilczynski Subject: [PATCH v1 2/5] ACPI: thermal: Drop redundant ACPI_TRIPS_REFRESH_DEVICES symbol Date: Tue, 30 May 2023 17:44:21 +0200 Message-ID: <8222291.T7Z3S40VBb@kreacher> In-Reply-To: <5675481.DvuYhMxLoT@kreacher> References: <5675481.DvuYhMxLoT@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: gggruggvucftvghtrhhoucdtuddrgedvhedrfeekjedgledtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrghdprhgtphhtthhopehm ihgthhgrlhdrfihilhgtiiihnhhskhhisehinhhtvghlrdgtohhm 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,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?1767334877382850243?= X-GMAIL-MSGID: =?utf-8?q?1767334877382850243?= 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 --- 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);