From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sn1nam01on0097.outbound.protection.outlook.com ([104.47.32.97]:64040 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933265AbeDIAka (ORCPT ); Sun, 8 Apr 2018 20:40:30 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Lv Zheng , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 050/101] ACPI: EC: Fix EC command visibility for dynamic debug Date: Mon, 9 Apr 2018 00:36:00 +0000 Message-ID: <20180409003505.164715-50-alexander.levin@microsoft.com> References: <20180409003505.164715-1-alexander.levin@microsoft.com> In-Reply-To: <20180409003505.164715-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Lv Zheng [ Upstream commit 4625d752e600c116e6327f9d7fc16e8f5be107e9 ] acpi_ec_cmd_string() currently is only enabled for "DEBUG" macro, but users trend to use CONFIG_DYNAMIC_DEBUG and enable ec.c pr_debug() print-outs by "dyndbg=3D'file ec.c +p'". In this use case, all command names are turned into UNDEF and the log is confusing. This affects bugzilla triage work. This patch fixes this issue by enabling acpi_ec_cmd_string() for CONFIG_DYNAMIC_DEBUG. Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5f9b74b9b71f..3ecadb24adde 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -167,7 +167,7 @@ static inline void acpi_ec_write_data(struct acpi_ec *e= c, u8 data) outb(data, ec->data_addr); } =20 -#ifdef DEBUG +#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) static const char *acpi_ec_cmd_string(u8 cmd) { switch (cmd) { --=20 2.15.1