Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2954365rdb; Tue, 12 Sep 2023 18:39:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFKT+rOZiOv0Rd1V1YdP96Kqb/kRmTrS7TN6zCd06OhPSeB2NU5uNCQoeA+XgYw77iLWu0 X-Received: by 2002:a05:6870:468a:b0:1d5:aed5:659f with SMTP id a10-20020a056870468a00b001d5aed5659fmr1362761oap.4.1694569170153; Tue, 12 Sep 2023 18:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694569170; cv=none; d=google.com; s=arc-20160816; b=FoVzv83tIcRyduBTHbNJps2nl5rlTSiLU/AmWfzYvccZklcT+/RpUNGfPmrYjp/JcF BpFEPWfSttd56S2eBRlvR1mxSqlCDCbiXPUnkmnR07646SuuRpw/5jlZmv0kacJTdWsK wfOXLu54X6Q6hFqilER75+A7U2LCDThmonBHHBBI+33BcLVSM7sLu2BI/hsllA+MS5ov mAtL+TF8yP/8euIr4QtvBNcDGVqT0SQwYSZvvW4cm3gWqGZVPjI813rasAjmf0TSsrNI CADpgVjzrUyjinGuvEeyq4zFNmYDV3DkJm498EwilE2Ak3GjDtClKXUiqFnzpOwO+RxS NySQ== 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=ohS9LV+ewW49/fB4yh5TLnsogYspb/daA/q4Tz3AVgM=; fh=TcRPROXzT9svfC8PL4GA9v01BlJpZsrjV4HRPcpqUxk=; b=l9JpyCPVC5o4M3NciDwsm/RBRI9DlfnaCeO0fJwC5IAv0t7oUgaJZ1FnuDMkpbMjiV ZcAasyyJ4iT4uyz2phxAPKKnMkPe3JJ24Mm2+rqUo19eX88ZbtcO5esLd/xlwGM+JhUX JNERMtzTTxLH/y0rJJMycufYTBg8l++zyMh9pjsXO4nXnczEEz8fppIOKys5mbhWs+4O X06RUKN0xzElFRvKq+MG0w4541FgfQCk4BwZn6lDsxB7dfEh8JQfCM997TzfhOZ0wPzS jeZPZEin4RtzKk03O5TumCEn8E/48WAPGEb4VcDbNmkJqCohZZTPGCMtMYVbIAWwhu9c 0FMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z16-20020a656650000000b00565d05b2211si8863952pgv.819.2023.09.12.18.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 18:39:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 8A34F83F5327; Tue, 12 Sep 2023 11:47:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237520AbjILSro (ORCPT + 99 others); Tue, 12 Sep 2023 14:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237337AbjILSrl (ORCPT ); Tue, 12 Sep 2023 14:47:41 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 642CB10D3; Tue, 12 Sep 2023 11:47:37 -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 e4066c49c5a5a305; Tue, 12 Sep 2023 20:47:35 +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 D70DE663BE5; Tue, 12 Sep 2023 20:47:34 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Zhang Rui , Srinivas Pandruvada , Daniel Lezcano Subject: [PATCH v1 8/9] ACPI: thermal: Drop redundant trip point flags Date: Tue, 12 Sep 2023 20:46:02 +0200 Message-ID: <3760530.kQq0lBPeGt@kreacher> In-Reply-To: <5708760.DvuYhMxLoT@kreacher> References: <5708760.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudeiiedgudeftdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehs rhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 11:47:44 -0700 (PDT) From: Rafael J. Wysocki Trip point flags previously used by the driver need not be used any more after the preceding changes, so drop them and adjust the code accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) Index: linux-pm/drivers/acpi/thermal.c =================================================================== --- linux-pm.orig/drivers/acpi/thermal.c +++ linux-pm/drivers/acpi/thermal.c @@ -43,14 +43,6 @@ #define ACPI_THERMAL_MAX_ACTIVE 10 #define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65 -#define ACPI_TRIPS_PASSIVE BIT(0) -#define ACPI_TRIPS_ACTIVE BIT(1) -#define ACPI_TRIPS_DEVICES BIT(2) - -#define ACPI_TRIPS_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE) - -#define ACPI_TRIPS_INIT (ACPI_TRIPS_THRESHOLDS | ACPI_TRIPS_DEVICES) - /* * This exception is thrown out in two cases: * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid @@ -58,12 +50,11 @@ * 2.TODO: Devices listed in _PSL, _ALx, _TZD may change. * We need to re-bind the cooling devices of a thermal zone when this occurs. */ -#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \ +#define ACPI_THERMAL_TRIPS_EXCEPTION(tz, str) \ do { \ - if (flags != ACPI_TRIPS_INIT) \ - acpi_handle_info(tz->device->handle, \ - "ACPI thermal trip point %s changed\n" \ - "Please report to linux-acpi@vger.kernel.org\n", str); \ + acpi_handle_info(tz->device->handle, \ + "ACPI thermal trip point %s changed\n" \ + "Please report to linux-acpi@vger.kernel.org\n", str); \ } while (0) static int act; @@ -212,7 +203,7 @@ static void acpi_thermal_update_passive_ update_acpi_thermal_trip_temp(acpi_trip, get_passive_temp(tz)); if (!acpi_trip->valid) - ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_PASSIVE, tz, "state"); + ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state"); } static bool update_passive_devices(struct acpi_thermal *tz, bool compare) @@ -230,7 +221,7 @@ static bool update_passive_devices(struc } if (compare && memcmp(&tz->trips.passive.devices, &devices, sizeof(devices))) - ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_PASSIVE, tz, "device"); + ACPI_THERMAL_TRIPS_EXCEPTION(tz, "device"); memcpy(&tz->trips.passive.devices, &devices, sizeof(devices)); return true; @@ -247,7 +238,7 @@ static void acpi_thermal_update_passive_ return; update_acpi_thermal_trip_temp(acpi_trip, THERMAL_TEMP_INVALID); - ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_PASSIVE, tz, "state"); + ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state"); } static long get_active_temp(struct acpi_thermal *tz, int index) @@ -282,7 +273,7 @@ static void acpi_thermal_update_active_t update_acpi_thermal_trip_temp(acpi_trip, get_active_temp(tz, index)); if (!acpi_trip->valid) - ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_ACTIVE, tz, "state"); + ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state"); } static bool update_active_devices(struct acpi_thermal *tz, int index, bool compare) @@ -302,7 +293,7 @@ static bool update_active_devices(struct } if (compare && memcmp(&tz->trips.active[index].devices, &devices, sizeof(devices))) - ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_ACTIVE, tz, "device"); + ACPI_THERMAL_TRIPS_EXCEPTION(tz, "device"); memcpy(&tz->trips.active[index].devices, &devices, sizeof(devices)); return true; @@ -319,7 +310,7 @@ static void acpi_thermal_update_active_d return; update_acpi_thermal_trip_temp(acpi_trip, THERMAL_TEMP_INVALID); - ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_ACTIVE, tz, "state"); + ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state"); } static int acpi_thermal_adjust_trip(struct thermal_trip *trip, void *data)