From patchwork Tue May 30 15:44:08 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: 100951 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2277672vqr; Tue, 30 May 2023 08:47:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64+un42p3rD7YooXxdWUg/MLlYNxvRBJFxVDMD1oQJwhzbkOTp1H+ZCcBFNTbxPm5a56NI X-Received: by 2002:a17:90b:1a85:b0:256:38d8:13c5 with SMTP id ng5-20020a17090b1a8500b0025638d813c5mr3110037pjb.2.1685461623605; Tue, 30 May 2023 08:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685461623; cv=none; d=google.com; s=arc-20160816; b=f8m0r0N3Vm2WCenGcZkFkdsFQHnQwl0gtaSn9useZKjAMevWqttR9wD4U/RPGmG+6u p4MZm9LSaf3qnMJlTrUFn7yxuOOC2/vAN9JzkjDAZOTgRJRx3rLy7Kpe4njrJQ9+xlBw 53uj7mFxmKw7nuL+YFcswNorjaVyzwkOGX+gBUiTk2eIvN9/FRVfO2qj1WiAEgfdYEJ1 Cbb+DEMn3fVgOi3foQhhgQt4RG1iPRZ1Vq54+KvUKYD52T2YbhG4NlSQH5SXkTDDcnvP WIXciylwQ8iWN7zUQnJdTFQzyka1yvrekpQBiWDOG8XRzJb3BssVteaKyoWdV/w16iT5 y4tQ== 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=Spyw9pp5kFevvh1I/ttigR1+0L2Mkw/pARvlbVXrVvc=; b=QsJ6FdBrMG+eajBIaNm5kFfFDCgrubOQkoHuz9hGe7Ez+gR35/g5wJdfaxVFoPyxoP 8lPTbmJan0Erg9dl4lNS2xPGVQOucLdJUEIX2h0/mrEiXHehHSibkgpusTCMnDn03V13 uP9lqCxXd/Cov5d85pyxjE8pw7jNnckMAkpfFN0KyF3JxPdq14MSKOOtomHbZeXRQDbW Q9l6FkSCBX0EJIgxLW5lb5wlVKt512QrhYD58Pyu+k7R4ZcbawF+Sj7LYyF8Mp00vAOm zjnzgz77tAJqHJg/ZbgWdSDpknzNDeuX8uhNseLD43a7MT0MmGigIfj5ZVP0OTlU0COy jLGw== 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 e18-20020a637452000000b0053fa62e7c4csi2080011pgn.776.2023.05.30.08.46.50; Tue, 30 May 2023 08:47:03 -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 S232465AbjE3PqO (ORCPT + 99 others); Tue, 30 May 2023 11:46:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232258AbjE3PqG (ORCPT ); Tue, 30 May 2023 11:46:06 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8CDDE5; 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 c85ce38deb63eb2c; Tue, 30 May 2023 17:46:01 +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 D05D58BB094; 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 1/5] ACPI: thermal: Use BIT() macro for defining flags Date: Tue, 30 May 2023 17:44:08 +0200 Message-ID: <3229381.aeNJFYEL58@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?1767334607534724982?= X-GMAIL-MSGID: =?utf-8?q?1767334607534724982?= From: Rafael J. Wysocki Use the BIT() macro for defining flag symbols in the ACPI thermal driver instead of using "raw" values for the flags. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Michal Wilczynski --- drivers/acpi/thermal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: linux-pm/drivers/acpi/thermal.c =================================================================== --- linux-pm.orig/drivers/acpi/thermal.c +++ linux-pm/drivers/acpi/thermal.c @@ -232,11 +232,11 @@ static int acpi_thermal_set_cooling_mode return 0; } -#define ACPI_TRIPS_CRITICAL 0x01 -#define ACPI_TRIPS_HOT 0x02 -#define ACPI_TRIPS_PASSIVE 0x04 -#define ACPI_TRIPS_ACTIVE 0x08 -#define ACPI_TRIPS_DEVICES 0x10 +#define ACPI_TRIPS_CRITICAL BIT(0) +#define ACPI_TRIPS_HOT BIT(1) +#define ACPI_TRIPS_PASSIVE BIT(2) +#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