Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp461367pxb; Wed, 20 Jan 2021 11:12:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4jnyZMOIMmr8xFsGjN50YHB2xMSgWO93+fcspZm+1wjoRCn5+a9nHE3PgHgN8QJgzNIMp X-Received: by 2002:a17:906:8609:: with SMTP id o9mr6998975ejx.241.1611169971694; Wed, 20 Jan 2021 11:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611169971; cv=none; d=google.com; s=arc-20160816; b=nTx9M8MbDSEl3SpA+WABatKENyODGkSSvmCVPBNqA5dhkZsyQfEZqeBG0JYM7oakSZ qvEIq8DnOCkRiEIF9QIvy7Hxkue3cJr4rTH34jvOLLTEW3QUPCNVR0Lb2YWthVM6EhN8 /ScEa7raREdWLSWOClX5vzzBTJPfgao40NCACPIO6PAZcZBvGiJn0PsPjYjKSbx2l/s+ ckI07uj2r6P0W4h9iHVZPzD6dLXUIskYgfEHXITcqHACOpGHRYe9PI842/6BKGJQYhF4 xlrXavrVWeSqmAJ/LYNRQM/pw2bjPvuy6szdEBsYgBOIlYvAU64gBvindIH/jwzYiGWZ qK8Q== 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=NnE8UQ9iMSrdZU303UVF6e9/e1YxWDxuTL45mcVsl6g=; b=UiU4un2CYxPie21rLzb7B8hgCCeIaFfR4qNJM+YDv6GbpmKx2etpJdnrhWMNQqkSjv UJlXpD1cywCfd3W7UGu/vkobn4EGMaP4vv7yOkqRD7q8ztae7jIzWthRGLnZRO9H6Qqj jX83Ndad7VVu/rDtO9IoMsFwyUWoWpfx2RsskX3vS7WOgtc7BzNVI5A1qQH0o4MowNiQ nweCXk719UBAAXoMRQQWqUdpKtux2x7wTwZ+Nc87/rFG51KglAFg70h4AxBbyANStmaa XdVFuT6sU3VMsCnT8YLvpc2lxJtNbEDU30Gg7uYE5OAmj3uxUDoLnjuVYtPrOgUI0pGw 33Bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qt23si947381ejb.373.2021.01.20.11.12.27; Wed, 20 Jan 2021 11:12:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392689AbhATTGn (ORCPT + 99 others); Wed, 20 Jan 2021 14:06:43 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:52034 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392433AbhATTD0 (ORCPT ); Wed, 20 Jan 2021 14:03:26 -0500 Received: from 89-64-80-175.dynamic.chello.pl (89.64.80.175) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.537) id 1695341e921a8916; Wed, 20 Jan 2021 20:02:15 +0100 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Erik Kaneda Subject: [PATCH v1 2/6] ACPI: PM: Clean up printing messages Date: Wed, 20 Jan 2021 19:58:18 +0100 Message-ID: <1984297.f6DJSeQy12@kreacher> In-Reply-To: <2809410.8bz27usjlQ@kreacher> References: <2809410.8bz27usjlQ@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Replace the remaining ACPI_DEBUG_PRINT() instances in device_pm.c with dev_dbg() invocations, drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not used any more, and drop the no longer needed ACPI_POWER_COMPONENT definition from the headers and documentation. Signed-off-by: Rafael J. Wysocki --- Documentation/firmware-guide/acpi/debug.rst | 1 - drivers/acpi/device_pm.c | 20 ++++++++------------ drivers/acpi/sysfs.c | 1 - include/acpi/acpi_drivers.h | 1 - 4 files changed, 8 insertions(+), 15 deletions(-) Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst =================================================================== --- linux-pm.orig/Documentation/firmware-guide/acpi/debug.rst +++ linux-pm/Documentation/firmware-guide/acpi/debug.rst @@ -59,7 +59,6 @@ shows the supported mask values, current ACPI_SBS_COMPONENT 0x00100000 ACPI_FAN_COMPONENT 0x00200000 ACPI_PCI_COMPONENT 0x00400000 - ACPI_POWER_COMPONENT 0x00800000 ACPI_CONTAINER_COMPONENT 0x01000000 ACPI_SYSTEM_COMPONENT 0x02000000 ACPI_THERMAL_COMPONENT 0x04000000 Index: linux-pm/drivers/acpi/device_pm.c =================================================================== --- linux-pm.orig/drivers/acpi/device_pm.c +++ linux-pm/drivers/acpi/device_pm.c @@ -10,6 +10,8 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#define pr_fmt(fmt) "ACPI: PM: " fmt + #include #include #include @@ -20,9 +22,6 @@ #include "internal.h" -#define _COMPONENT ACPI_POWER_COMPONENT -ACPI_MODULE_NAME("device_pm"); - /** * acpi_power_state_string - String representation of ACPI device power state. * @state: ACPI device power state to return the string representation of. @@ -130,8 +129,8 @@ int acpi_device_get_power(struct acpi_de *state = result; out: - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] power state is %s\n", - device->pnp.bus_id, acpi_power_state_string(*state))); + dev_dbg(&device->dev, "Device power state is %s\n", + acpi_power_state_string(*state)); return 0; } @@ -174,9 +173,8 @@ int acpi_device_set_power(struct acpi_de /* There is a special case for D0 addressed below. */ if (state > ACPI_STATE_D0 && state == device->power.state) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] already in %s\n", - device->pnp.bus_id, - acpi_power_state_string(state))); + dev_dbg(&device->dev, "Device already in %s\n", + acpi_power_state_string(state)); return 0; } @@ -276,10 +274,8 @@ int acpi_device_set_power(struct acpi_de acpi_power_state_string(target_state)); } else { device->power.state = target_state; - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Device [%s] transitioned to %s\n", - device->pnp.bus_id, - acpi_power_state_string(target_state))); + dev_dbg(&device->dev, "Power state changed to %s\n", + acpi_power_state_string(target_state)); } return result; Index: linux-pm/drivers/acpi/sysfs.c =================================================================== --- linux-pm.orig/drivers/acpi/sysfs.c +++ linux-pm/drivers/acpi/sysfs.c @@ -59,7 +59,6 @@ static const struct acpi_dlayer acpi_deb ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT), ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT), ACPI_DEBUG_INIT(ACPI_PCI_COMPONENT), - ACPI_DEBUG_INIT(ACPI_POWER_COMPONENT), ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT), ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT), ACPI_DEBUG_INIT(ACPI_THERMAL_COMPONENT), Index: linux-pm/include/acpi/acpi_drivers.h =================================================================== --- linux-pm.orig/include/acpi/acpi_drivers.h +++ linux-pm/include/acpi/acpi_drivers.h @@ -22,7 +22,6 @@ #define ACPI_SBS_COMPONENT 0x00100000 #define ACPI_FAN_COMPONENT 0x00200000 #define ACPI_PCI_COMPONENT 0x00400000 -#define ACPI_POWER_COMPONENT 0x00800000 #define ACPI_CONTAINER_COMPONENT 0x01000000 #define ACPI_SYSTEM_COMPONENT 0x02000000 #define ACPI_THERMAL_COMPONENT 0x04000000